|
From: <di...@us...> - 2011-09-30 00:22:08
|
Revision: 761
http://safekeep.svn.sourceforge.net/safekeep/?rev=761&view=rev
Author: dimi
Date: 2011-09-30 00:22:02 +0000 (Fri, 30 Sep 2011)
Log Message:
-----------
Marco Bozzolan <ma...@s1...>
Use the subprocess module when required,
avoid noisy deprecation error.
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2011-09-30 00:19:57 UTC (rev 760)
+++ safekeep/trunk/safekeep 2011-09-30 00:22:02 UTC (rev 761)
@@ -1065,7 +1065,12 @@
cmd.extend(['-T', '-i', cfg['key_ctrl'], '-l', cfg['user'], cfg['host']])
cmd.extend(['safekeep', '--client'])
- (cin,cout) = os.popen2(cmd)
+ if use_subprocess:
+ subp = subprocess.Popen(cmd, stdin=PIPE, stdout=PIPE)
+ cin = subp.stdin
+ cout = subp.stdout
+ else:
+ (cin, cout) = os.popen2(cmd)
cin.write('ALOHA: %s, %s\n' % (PROTOCOL, VERSION))
cin.flush()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|