client/tools
by Michael Mraka
client/tools/rhnpush/uploadLib.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 88571bfbb615e5297366e51f16f28f0ad31208f6
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Jan 26 16:04:37 2010 +0100
import function directly; checksum namespace overlaps with a variable
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index a82a5d2..69db67e 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -22,7 +22,7 @@ import getpass
import rhnpush_cache
import struct
from spacewalk.common import rhn_mpm
-from spacewalk.common import checksum
+from spacewalk.common.checksum import getFileChecksum
try:
from rhn import rpclib
@@ -507,7 +507,7 @@ def _processFile(filename, relativeDir=None, source=None, nosig=None):
f.seek(0, 0)
# Compute digest
checksum_type = h.checksum_type()
- checksum = checksum.getFileChecksum(checksum_type, file=f)
+ checksum = getFileChecksum(checksum_type, file=f)
f.close()
if h is None:
raise UploadError("%s is not a valid RPM file" % filename)
14 years, 3 months
Changes to 'refs/tags/spacewalk-backend-0.8.37-1'
by Michael Mraka
Tag 'spacewalk-backend-0.8.37-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-01-26 13:50 +0000
Tagging package [spacewalk-backend] version [0.8.37-1] in directory [backend/].
Changes since spacewalk-certs-tools-0.8.6-1:
Jan Pazdziora (1):
Remove the colon from the string, to avoid the double colon on output.
Michael Mraka (2):
fixed one more usage of parseRPMFilename
Automatic commit of package [spacewalk-backend] release [0.8.37-1].
---
backend/server/rhnPackage.py | 2 +-
backend/spacewalk-backend.spec | 6 +++++-
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 2 +-
rel-eng/packages/spacewalk-backend | 2 +-
4 files changed, 8 insertions(+), 4 deletions(-)
---
14 years, 3 months
backend/spacewalk-backend.spec rel-eng/packages
by Michael Mraka
backend/spacewalk-backend.spec | 6 +++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit aa9f702bb7f17248f0557c234befbafcc1f2d0f2
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Jan 26 14:50:38 2010 +0100
Automatic commit of package [spacewalk-backend] release [0.8.37-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 9c1f5b9..0cc6ec6 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -8,7 +8,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.8.36
+Version: 0.8.37
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -609,6 +609,10 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Tue Jan 26 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.8.37-1
+- fixed HTTP 404 on package download
+- execute commands through shell
+
* Fri Jan 22 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.8.36-1
- fixed handling subprocess.poll() return codes
- 557581 - fixed config deployment would fail when multiple activation keys present
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index b19c8aa..b761b78 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.8.36-1 backend/
+0.8.37-1 backend/
14 years, 3 months
backend/server
by Michael Mraka
backend/server/rhnPackage.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 18b077ab79d7b19df0f29434156feca9b646e4bd
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Jan 26 12:58:52 2010 +0100
fixed one more usage of parseRPMFilename
related to commit 1db6ede50c55b44bc464119d9c29d4bc1b9c4df7
fixed yum error [Errno 14] HTTP Error 404
diff --git a/backend/server/rhnPackage.py b/backend/server/rhnPackage.py
index 1020b2e..8bd3336 100644
--- a/backend/server/rhnPackage.py
+++ b/backend/server/rhnPackage.py
@@ -67,7 +67,7 @@ def get_package_path(server_id, pkg_spec, channel):
"""
h = rhnSQL.prepare(statement)
pkg = map(str, pkg)
- h.execute(name = pkg[0], ver = pkg[1], rel = pkg[2], arch = pkg[4],
+ h.execute(name = pkg[0], ver = pkg[2], rel = pkg[3], arch = pkg[4],
channel = channel, server_id = server_id)
rs = h.fetchall_dict()
if not rs:
14 years, 3 months
java/code
by Jan Pazdziora
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 1618889879b5ca55517e5fc4d6e75f48820bb62b
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Jan 26 09:03:53 2010 +0100
Remove the colon from the string, to avoid the double colon on output.
This makes tree-form.jspf.location compatible with tree-form.jspf.label
which does not have the colon either.
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index 209df42..6db0cae 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -17108,7 +17108,7 @@ The Tree Path, Kickstart RPM, Base Channel, and Installer Generation should alwa
</trans-unit>
<trans-unit id="tree-form.jspf.location">
-<source>Tree Path:</source>
+<source>Tree Path</source>
<context-group name="ctx">
<context context-type="sourcefile">/rhn/kickstart/TreeCreate.do</context>
</context-group>
14 years, 3 months
Changes to 'refs/tags/spacewalk-certs-tools-0.8.6-1'
by Michael Mraka
Tag 'spacewalk-certs-tools-0.8.6-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-01-25 16:17 +0000
Tagging package [spacewalk-certs-tools] version [0.8.6-1] in directory [spacewalk/certs-tools/].
Changes since yum-rhn-plugin-0.8.4-1:
Michael Mraka (1):
Automatic commit of package [spacewalk-certs-tools] release [0.8.6-1].
---
rel-eng/packages/spacewalk-certs-tools | 2 +-
spacewalk/certs-tools/spacewalk-certs-tools.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
---
14 years, 3 months
rel-eng/packages spacewalk/certs-tools
by Michael Mraka
rel-eng/packages/spacewalk-certs-tools | 2 +-
spacewalk/certs-tools/spacewalk-certs-tools.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 4d23a7203bc2e0a895beb0ebb399baf4279b5ac8
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Jan 25 17:17:16 2010 +0100
Automatic commit of package [spacewalk-certs-tools] release [0.8.6-1].
diff --git a/rel-eng/packages/spacewalk-certs-tools b/rel-eng/packages/spacewalk-certs-tools
index f61da62..bac5181 100644
--- a/rel-eng/packages/spacewalk-certs-tools
+++ b/rel-eng/packages/spacewalk-certs-tools
@@ -1 +1 @@
-0.8.5-1 spacewalk/certs-tools/
+0.8.6-1 spacewalk/certs-tools/
diff --git a/spacewalk/certs-tools/spacewalk-certs-tools.spec b/spacewalk/certs-tools/spacewalk-certs-tools.spec
index 9362db7..5c0b598 100644
--- a/spacewalk/certs-tools/spacewalk-certs-tools.spec
+++ b/spacewalk/certs-tools/spacewalk-certs-tools.spec
@@ -2,7 +2,7 @@ Name: spacewalk-certs-tools
Summary: Spacewalk SSL Key/Cert Tool
Group: Applications/Internet
License: GPLv2 and Python
-Version: 0.8.5
+Version: 0.8.6
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -56,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT
%{_var}/www/html/pub/bootstrap/client_config_update.py*
%changelog
+* Mon Jan 25 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.8.6-1
+- dead code / imports
+
* Fri Jan 15 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.8.5-1
- fixed build error
14 years, 3 months
Changes to 'refs/tags/yum-rhn-plugin-0.8.4-1'
by Michael Mraka
Tag 'yum-rhn-plugin-0.8.4-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2010-01-25 16:15 +0000
Tagging package [yum-rhn-plugin] version [0.8.4-1] in directory [client/rhel/yum-rhn-plugin/].
Changes since rhnsd-4.8.2-1:
Jan Pazdziora (1):
546312 - fix typo - we do not want to assign the result of the SetResultType operation.
Michael Mraka (3):
replaced popen2 with subprocess in client
on Fedora 12 yum-rhn-plugin end up with HTTP Error 401 Authorization Required
Automatic commit of package [yum-rhn-plugin] release [0.8.4-1].
Miroslav Suchý (3):
cleanup - this comments do not have sense since commit 7ec5fa4c
execute commands through shell
execute command through shell only if we get string, if it is sequence then call it directly
Tomas Lestach (1):
529460 - fixing detection of disconnected satellite
---
backend/satellite_tools/disk_dumper/iss_runcommand.py | 2
backend/spacewalk/common/fileutils.py | 7 +-
client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 2
client/rhel/yum-rhn-plugin/rhnplugin.py | 13 +++++
client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec | 5 +-
client/solaris/rhnclient/rhn/client/rhnUtils.py | 27 ++++-------
client/solaris/smartpm/smart/backends/solaris/loader.py | 11 ++--
client/solaris/smartpm/smart/backends/solaris/pm.py | 1
client/tools/osad/src/jabber_lib.py | 4 -
client/tools/rhn-kickstart/rhnkickstart/kickstart.py | 12 ++--
client/tools/rhncfg/actions/script.py | 2
client/tools/rhnpush/archive.py | 13 ++---
client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py | 11 ++--
java/code/src/com/redhat/rhn/common/conf/ConfigDefaults.java | 2
rel-eng/packages/yum-rhn-plugin | 2
15 files changed, 65 insertions(+), 49 deletions(-)
---
14 years, 3 months
client/rhel rel-eng/packages
by Michael Mraka
client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec | 5 ++++-
rel-eng/packages/yum-rhn-plugin | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 01067db82ce25e034cc4c085f2ee13c9ae32a6fc
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Jan 25 17:15:50 2010 +0100
Automatic commit of package [yum-rhn-plugin] release [0.8.4-1].
diff --git a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
index 47cd678..d0c4f86 100644
--- a/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
+++ b/client/rhel/yum-rhn-plugin/yum-rhn-plugin.spec
@@ -1,6 +1,6 @@
Summary: RHN support for yum
Name: yum-rhn-plugin
-Version: 0.8.3
+Version: 0.8.4
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Base
@@ -53,6 +53,9 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE
%changelog
+* Mon Jan 25 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.8.4-1
+- fixed HTTP Error 401 Authorization Required on Fedora 12
+
* Fri Jan 15 2010 Michael Mraka <michael.mraka(a)redhat.com> 0.8.3-1
- fixed syntax error
diff --git a/rel-eng/packages/yum-rhn-plugin b/rel-eng/packages/yum-rhn-plugin
index 4224b26..fbe705a 100644
--- a/rel-eng/packages/yum-rhn-plugin
+++ b/rel-eng/packages/yum-rhn-plugin
@@ -1 +1 @@
-0.8.3-1 client/rhel/yum-rhn-plugin/
+0.8.4-1 client/rhel/yum-rhn-plugin/
14 years, 3 months
2 commits - client/rhel client/solaris client/tools
by Michael Mraka
client/rhel/yum-rhn-plugin/rhnplugin.py | 13 ++++++
client/solaris/rhnclient/rhn/client/rhnUtils.py | 27 +++++--------
client/solaris/smartpm/smart/backends/solaris/loader.py | 11 ++---
client/solaris/smartpm/smart/backends/solaris/pm.py | 1
client/tools/osad/src/jabber_lib.py | 4 -
client/tools/rhn-kickstart/rhnkickstart/kickstart.py | 12 +++--
client/tools/rhncfg/actions/script.py | 2
client/tools/rhnpush/archive.py | 13 +++---
client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py | 11 ++---
9 files changed, 53 insertions(+), 41 deletions(-)
New commits:
commit 213b97e38dd75007281b37e3180dc68b736f2fac
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Jan 25 17:08:37 2010 +0100
on Fedora 12 yum-rhn-plugin end up with HTTP Error 401 Authorization Required
urlgrabber on Fedora 12 switched to use pycurl as a backend and it can't
handle empty X-RHN-Auth-User-Id header
diff --git a/client/rhel/yum-rhn-plugin/rhnplugin.py b/client/rhel/yum-rhn-plugin/rhnplugin.py
index 3861b78..82f9474 100644
--- a/client/rhel/yum-rhn-plugin/rhnplugin.py
+++ b/client/rhel/yum-rhn-plugin/rhnplugin.py
@@ -16,6 +16,11 @@ import yum.Errors
from urlgrabber.grabber import URLGrabber
from urlgrabber.grabber import URLGrabError
+try:
+ from urlgrabber.grabber import pycurl
+except:
+ pycurl = None
+
from iniparse import INIConfig
import gettext
_ = gettext.gettext
@@ -339,6 +344,14 @@ class RhnRepo(YumRepository):
# return the path to the local file
self.setupRhnHttpHeaders()
+ if pycurl:
+ # pycurl/libcurl workaround: in libcurl setting an empty HTTP header means
+ # remove that header from the list
+ # but we have to send and empty X-RHN-Auth-User-Id ...
+ AuthUserH = 'X-RHN-Auth-User-Id'
+ if (AuthUserH in self.http_headers and not self.http_headers[AuthUserH]):
+ self.http_headers[AuthUserH] = "\nX-libcurl-Empty-Header-Workaround: *"
+
# Turn our dict into a list of 2-tuples
headers = YumRepository._YumRepository__headersListFromDict(self)
commit 9afebed0e0c6fe742b3a40f73955022e71ecd3e0
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Sat Jan 23 15:28:32 2010 +0100
replaced popen2 with subprocess in client
diff --git a/client/solaris/rhnclient/rhn/client/rhnUtils.py b/client/solaris/rhnclient/rhn/client/rhnUtils.py
index 58a692d..37b480d 100644
--- a/client/solaris/rhnclient/rhn/client/rhnUtils.py
+++ b/client/solaris/rhnclient/rhn/client/rhnUtils.py
@@ -13,7 +13,7 @@ import sys
import time
import string
import md5
-import popen2
+import subprocess
import select
import tempfile
import urlparse
@@ -207,35 +207,30 @@ def pprint_pkglist(pkglist):
def my_popen(cmd):
- c = popen2.Popen3(cmd, capturestderr=1, bufsize=0)
+ c = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE, close_fds=True, bufsize=0)
# We don't write to the child process
- c.tochild.close()
+ c.stdin.close()
child_out = tempfile.TemporaryFile()
child_err = tempfile.TemporaryFile()
# Map the input file descriptor with the temporary (output) one
- fd_mappings = [(c.fromchild, child_out), (c.childerr, child_err)]
+ fd_mappings = [(c.stdout, child_out), (c.stderr, child_err)]
buffer_size = 16384
exitcode = None
while 1:
status = c.poll()
- if status != -1:
- if os.WIFEXITED(status):
+ if status is not None:
+ if status >= 0:
# Save the exit code, we still have to read from the pipes
- exitcode = os.WEXITSTATUS(status)
- elif os.WIFSIGNALED(status):
- # Some signal terminated this process
- sig = os.WTERMSIG(status)
- exitcode = -sig
- break
- elif os.WIFSTOPPED(status):
- # Some signal stopped this process
- sig = os.WSTOPSIG(status)
- exitcode = -sig
+ exitcode = status
+ else:
+ # Some signal sent to this process
+ exitcode = status
break
fd_set = map(lambda x: x[0], fd_mappings)
diff --git a/client/solaris/smartpm/smart/backends/solaris/loader.py b/client/solaris/smartpm/smart/backends/solaris/loader.py
index 2e65886..11be85d 100644
--- a/client/solaris/smartpm/smart/backends/solaris/loader.py
+++ b/client/solaris/smartpm/smart/backends/solaris/loader.py
@@ -595,13 +595,14 @@ def getPkgData(filename):
pkgdir = filename
else:
import tempfile
- import popen2
+ import subprocess
tdir = tempfile.mkdtemp()
- c = popen2.Popen3(("pkgtrans", filename, tdir, "all"),
- capturestderr=1)
+ c = subprocess.Popen(("pkgtrans", filename, tdir, "all"),
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE, close_fds=True)
ret = c.wait()
- if ret != 0: return (pkginfo, depend)
- m = PKGTRANSRE.match(c.childerr.read())
+ if ret: return (pkginfo, depend)
+ m = PKGTRANSRE.match(c.stderr.read())
if not m: return (pkginfo, depend)
pkgname = m.groups()[0]
pkgdir = os.path.join(tdir, pkgname)
diff --git a/client/solaris/smartpm/smart/backends/solaris/pm.py b/client/solaris/smartpm/smart/backends/solaris/pm.py
index 5011700..df140fa 100644
--- a/client/solaris/smartpm/smart/backends/solaris/pm.py
+++ b/client/solaris/smartpm/smart/backends/solaris/pm.py
@@ -22,7 +22,6 @@
import commands
import os
-import popen2
import shutil
import tempfile
import zipfile
diff --git a/client/tools/osad/src/jabber_lib.py b/client/tools/osad/src/jabber_lib.py
index 344a91b..bbe2b4b 100644
--- a/client/tools/osad/src/jabber_lib.py
+++ b/client/tools/osad/src/jabber_lib.py
@@ -1385,8 +1385,8 @@ def push_to_background():
# close file descriptors
- #import popen2
- #for i in range(3, popen2.MAXFD):
+ # from subprocess import MAXFD
+ #for i in range(3, MAXFD):
# try:
# os.close(i)
# except:
diff --git a/client/tools/rhn-kickstart/rhnkickstart/kickstart.py b/client/tools/rhn-kickstart/rhnkickstart/kickstart.py
index e21fe3c..414cbc8 100644
--- a/client/tools/rhn-kickstart/rhnkickstart/kickstart.py
+++ b/client/tools/rhn-kickstart/rhnkickstart/kickstart.py
@@ -23,7 +23,7 @@ import time
import types
import shutil
import string
-import popen2
+import subprocess
from rhnkickstart import lilo
from rhnkickstart import common
@@ -424,14 +424,16 @@ def _modify_s390(base, vmlinuz, initrd, append, error_messages):
def my_popen(cmd):
- c = popen2.Popen3(cmd, capturestderr=1, bufsize=-1)
- c.tochild.close()
+ c = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE, close_fds=True,
+ bufsize=-1)
+ c.stdin.close()
while 1:
status = c.poll()
- if os.WIFEXITED(status):
+ if status is not None:
# Save the exit code, we still have to read from
# the pipes
- return os.WEXITSTATUS(status), c.fromchild, c.childerr
+ return status, c.stdout, c.stderr
def local_network_kickstart(extra_append, ks_data, static_device, initrd, preserve_files=[]):
"""
diff --git a/client/tools/rhncfg/actions/script.py b/client/tools/rhncfg/actions/script.py
index 365dac9..3857882 100644
--- a/client/tools/rhncfg/actions/script.py
+++ b/client/tools/rhncfg/actions/script.py
@@ -22,7 +22,7 @@ import select
import signal
import tempfile
import base64
-from popen2 import MAXFD
+from subprocess import MAXFD
# this is ugly, hopefully it will be natively supported in up2date
diff --git a/client/tools/rhnpush/archive.py b/client/tools/rhnpush/archive.py
index dd5c72f..9ab991c 100644
--- a/client/tools/rhnpush/archive.py
+++ b/client/tools/rhnpush/archive.py
@@ -20,7 +20,7 @@
# $Id$
import os
-import popen2
+import subprocess
import shutil
import sys
import tempfile
@@ -318,15 +318,16 @@ def _has_executable(exc):
def _my_popen(cmd):
"""Execute a command as a subprocess and return its exit status"""
- popen = popen2.Popen3(cmd, capturestderr=1)
- popen.tochild.close()
+ popen = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE, close_fds=True)
+ popen.stdin.close()
txt = ""
while 1:
- rd, wr, ex = select.select([ popen.fromchild, popen.childerr ], [], [ popen.fromchild, popen.childerr ], 5)
+ rd, wr, ex = select.select([ popen.stdout, popen.stderr ], [], [ popen.stdout, popen.stderr ], 5)
if ex:
- txt += popen.fromchild.read()
- txt += popen.childerr.read()
+ txt += popen.stdout.read()
+ txt += popen.stderr.read()
break
if rd:
txt += rd[0].read()
diff --git a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
index 0215b60..9e635be 100644
--- a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
+++ b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
@@ -22,7 +22,7 @@ import shutil
import sys
import types
import os
-import popen2
+import subprocess
import os.path
import tempfile
import xmlrpclib
@@ -271,14 +271,15 @@ def _remove_func(path):
def my_popen(cmd):
print "CMD: %s " % cmd
- c = popen2.Popen3(cmd, capturestderr=1, bufsize=-1)
- c.tochild.close()
+ c = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE, close_fds=True, bufsize=-1)
+ c.stdin.close()
while 1:
status = c.poll()
- if os.WIFEXITED(status):
+ if status is not None:
# Save the exit code, we still have to read from
# the pipes
- return os.WEXITSTATUS(status), c.fromchild, c.childerr
+ return status, c.stdout, c.stderr
def _build_error(status, stdout, stderr):
params = {
14 years, 3 months