Bug 1274655 - Ensure environment variable isn't a unicode; r=me
☠☠ backed out by ff8388f0333f ☠ ☠
authorGregory Szorc <gps@mozilla.com>
Tue, 24 May 2016 11:03:57 -0700
changeset 337808 d6e4c44790d2cb499f01d62a0ed3d97f4059eaa5
parent 337807 a2a4c06d9736850782d8cc52802e0207ca1bf27a
child 337809 ff8388f0333fb73e03f5597f3c57e67e55f8e5cf
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1274655
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1274655 - Ensure environment variable isn't a unicode; r=me Older versions of Python 2.7 have a bug where subprocess and execve don't like unicode in the environment variable dict. This patch ensures we are using a str. Pusing on a CLOSED TREE like a boss.
testing/mozharness/mozharness/mozilla/building/buildbase.py
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -848,16 +848,20 @@ or run without that action (ie: --no-{ac
 
         # first grab the buildid
         env['MOZ_BUILD_DATE'] = self.query_buildid()
 
         # Set the source repository to what we're building from since
         # the default is to query `hg paths` which isn't reliable with pooled
         # storage
         env['MOZ_SOURCE_REPO'] = self.repo_path
+        # Some older versions of Python 2.7 don't like unicode in environment
+        # variables. Ensure a str is used.
+        if isinstance(self.repo_path, unicode):
+            env['MOZ_SOURCE_REPO'] = self.repo_path.encode('latin1')
 
         if self.query_is_nightly() or self.query_is_nightly_promotion():
             if self.query_is_nightly():
                 # nightly promotion needs to set update_channel but not do all the 'IS_NIGHTLY'
                 # automation parts like uploading symbols for now
                 env["IS_NIGHTLY"] = "yes"
             # in branch_specifics.py we might set update_channel explicitly
             if c.get('update_channel'):