launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24730
[Merge] ~pappacena/turnip:popen-close-streams into turnip:master
Thiago F. Pappacena has proposed merging ~pappacena/turnip:popen-close-streams into turnip:master.
Commit message:
Closing Popen std streams to avoid warnings on python3
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~pappacena/turnip/+git/turnip/+merge/383914
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/turnip:popen-close-streams into turnip:master.
diff --git a/turnip/api/tests/test_helpers.py b/turnip/api/tests/test_helpers.py
index a6035b4..60508d5 100644
--- a/turnip/api/tests/test_helpers.py
+++ b/turnip/api/tests/test_helpers.py
@@ -113,11 +113,12 @@ class RepoFactory(object):
cmd_line += self._get_cmd_line_auth_params()
cmd_line += ['tag', '-m', tag_message, tag_name, oid.hex]
subproc = Popen(cmd_line, stderr=PIPE, stdout=PIPE)
- retcode = subproc.wait()
+ outs, errs = subproc.communicate()
+ retcode = subproc.returncode
if retcode:
log.error(
"Command %s finished with error code %s. stdout/stderr:\n%s",
- cmd_line, retcode, subproc.stderr.read())
+ cmd_line, retcode, outs)
raise CalledProcessError(retcode, cmd_line)
def makeSignature(self, name, email, encoding='utf-8'):