19 lines
755 B
Plaintext
19 lines
755 B
Plaintext
Bugfix: DeprecationWarning: os.popen2 is deprecated
|
|
cf http://bugs.gentoo.org/attachment.cgi?id=216585&action=view
|
|
|
|
--- rdiff_backup/SetConnections.py.orig Mon Mar 16 14:36:21 2009
|
|
+++ rdiff_backup/SetConnections.py Wed Aug 19 20:31:28 2015
|
|
@@ -135,10 +135,10 @@ def init_connection(remote_cmd):
|
|
if not remote_cmd: return Globals.local_connection
|
|
|
|
Log("Executing " + remote_cmd, 4)
|
|
- if os.name == "nt":
|
|
+ if map(int, sys.version.split()[0].split('.')[:2]) >= [2, 6]:
|
|
import subprocess
|
|
try:
|
|
- process = subprocess.Popen(remote_cmd, shell=False, bufsize=0,
|
|
+ process = subprocess.Popen(remote_cmd, shell=True, bufsize=0,
|
|
stdin=subprocess.PIPE,
|
|
stdout=subprocess.PIPE)
|
|
(stdin, stdout) = (process.stdin, process.stdout)
|