Fix a deprecationWarning with python 2.6
ok jasper@
This commit is contained in:
parent
041bf9f688
commit
7729581bc6
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.10 2010/08/30 17:57:31 fgsch Exp $
|
||||
# $OpenBSD: Makefile,v 1.11 2010/09/15 09:02:50 pea Exp $
|
||||
|
||||
COMMENT = incremental backup
|
||||
|
||||
MODPY_EGG_VERSION = 1.2.8
|
||||
DISTNAME = rdiff-backup-${MODPY_EGG_VERSION}
|
||||
REVISION = 1
|
||||
REVISION = 2
|
||||
CATEGORIES = sysutils
|
||||
|
||||
HOMEPAGE = http://www.nongnu.org/rdiff-backup/
|
||||
|
@ -0,0 +1,20 @@
|
||||
$OpenBSD: patch-rdiff_backup_SetConnections_py,v 1.1 2010/09/15 09:02:50 pea Exp $
|
||||
--- rdiff_backup/SetConnections.py.orig Mon Mar 16 15:36:21 2009
|
||||
+++ rdiff_backup/SetConnections.py Wed Sep 15 09:54:41 2010
|
||||
|
||||
Bugfix: DeprecationWarning: os.popen2 is deprecated
|
||||
cf http://bugs.gentoo.org/attachment.cgi?id=216585&action=view
|
||||
|
||||
@@ -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)
|
Loading…
Reference in New Issue
Block a user