[Pkg-privacy-commits] [pyptlib] 118/136: Update creationflags in list value of _Popen_defaults.
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:25:18 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository pyptlib.
commit 445e9f02d2856134794e226f59d5f48458a7cab6
Author: David Fifield <david at bamsoftware.com>
Date: Tue Oct 22 19:15:21 2013 -0700
Update creationflags in list value of _Popen_defaults.
It looks like this code might have been originally written to use a
dict, and the mswindows branch didn't get updated to work with a list of
tuples instead. This is the exception I was getting on Windows:
Traceback (most recent call last):
File "obfs-flash-client", line 11, in <module>
from pyptlib.util.subproc import auto_killall, Popen
File "pyptlib\util\subproc.py", line 31, in <module>
_Popen_defaults['creationflags'] |= subprocess.CREATE_NEW_PROCESS_GROUP
TypeError: list indices must be integers, not str
---
pyptlib/util/subproc.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pyptlib/util/subproc.py b/pyptlib/util/subproc.py
index 314441c..30ee9aa 100644
--- a/pyptlib/util/subproc.py
+++ b/pyptlib/util/subproc.py
@@ -28,7 +28,9 @@ a = inspect.getargspec(subprocess.Popen.__init__)
_Popen_defaults = zip(a.args[-len(a.defaults):],a.defaults); del a
if mswindows:
# required for os.kill() to work
- _Popen_defaults['creationflags'] |= subprocess.CREATE_NEW_PROCESS_GROUP
+ tmp = dict(_Popen_defaults)
+ tmp['creationflags'] |= subprocess.CREATE_NEW_PROCESS_GROUP
+ _Popen_defaults = tmp.items()
class Popen(subprocess.Popen):
"""Wrapper for subprocess.Popen that tracks every child process.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/pyptlib.git
More information about the Pkg-privacy-commits
mailing list