Patchwork D8331: py3: make setup.py's hgcommand() consistently return bytes

login
register
mail settings
Submitter phabricator
Date March 26, 2020, 1:28 a.m.
Message ID <differential-rev-PHID-DREV-ii6brpsumtp4zxoqtogi-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/45894/
State Superseded
Headers show

Comments

phabricator - March 26, 2020, 1:28 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Before this patch, it returned unicode when the command failed. That
  made e.g. `make local PYTHON=python3` fail on an obsolete commit.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  setup.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -267,7 +267,7 @@ 
         if err or returncode != 0:
             printf("stderr from '%s':" % (' '.join(cmd)), file=sys.stderr)
             printf(err, file=sys.stderr)
-            return ''
+            return b''
         return out