Patchwork D5570: hg-docker: fix Python 3.4 compatibility (for CentOS 7)

login
register
mail settings
Submitter phabricator
Date Jan. 16, 2019, 9:34 a.m.
Message ID <9572eb9f89d8b7311c721efc4ec53946@localhost.localdomain>
Download mbox | patch
Permalink /patch/37781/
State Not Applicable
Headers show

Comments

phabricator - Jan. 16, 2019, 9:34 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG92b3811fd15f: hg-docker: fix Python 3.4 compatibility (for CentOS 7) (authored by Mathias De Mare &lt;mathias.de_mare@nokia.com&gt;, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5570?vs=13208&id=13243

REVISION DETAIL
  https://phab.mercurial-scm.org/D5570

AFFECTED FILES
  contrib/packaging/hg-docker

CHANGE DETAILS




To: Mathiasdm, #hg-reviewers
Cc: yuja, mercurial-devel

Patch

diff --git a/contrib/packaging/hg-docker b/contrib/packaging/hg-docker
--- a/contrib/packaging/hg-docker
+++ b/contrib/packaging/hg-docker
@@ -72,7 +72,12 @@ 
     ]
 
     print('executing: %r' % args)
-    subprocess.run(args, input=dockerfile, check=True)
+    p = subprocess.Popen(args, stdin=subprocess.PIPE)
+    p.communicate(input=dockerfile)
+    if p.returncode:
+        raise subprocess.CalledProcessException(
+                p.returncode, 'failed to build docker image: %s %s' \
+                % (p.stdout, p.stderr))
 
 def command_build(args):
     build_args = []