Bug 964379 - Ensure that mozinfo.info's keys are ASCII, not Unicode, r=gps
authorJoshua Cranmer <Pidgeot18@gmail.com>
Tue, 18 Feb 2014 10:41:39 -0600
changeset 169369 35240da28ab08ca6324166b385f9f5e3f101d50b
parent 169368 ae95fa9d4450086098434c83075e458eaef13864
child 169370 a299ef7c6d98e2619449b6b56a3171e8a41cb582
push id26245
push userryanvm@gmail.com
push dateTue, 18 Feb 2014 20:18:17 +0000
treeherdermozilla-central@9019cc90719c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs964379
milestone30.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 964379 - Ensure that mozinfo.info's keys are ASCII, not Unicode, r=gps
testing/xpcshell/runxpcshelltests.py
--- a/testing/xpcshell/runxpcshelltests.py
+++ b/testing/xpcshell/runxpcshelltests.py
@@ -1302,23 +1302,22 @@ class XPCShellTests(object):
             if not os.path.isfile(mozInfoFile):
                 self.log.error("Error: couldn't find mozinfo.json at '%s'. Perhaps you need to use --build-info-json?" % mozInfoFile)
                 return False
             self.mozInfo = json.load(open(mozInfoFile))
 
         # mozinfo.info is used as kwargs.  Some builds are done with
         # an older Python that can't handle Unicode keys in kwargs.
         # All of the keys in question should be ASCII.
-        if 'info' in self.mozInfo:
-            fixedInfo = {}
-            for k, v in self.mozInfo['info'].items():
-                if isinstance(k, unicode):
-                    k = k.encode('ascii')
-                fixedInfo[k] = v
-            self.mozInfo['info'] = fixedInfo
+        fixedInfo = {}
+        for k, v in self.mozInfo.items():
+            if isinstance(k, unicode):
+                k = k.encode('ascii')
+            fixedInfo[k] = v
+        self.mozInfo = fixedInfo
 
         mozinfo.update(self.mozInfo)
 
         # buildEnvironment() needs mozInfo, so we call it after mozInfo is initialized.
         self.buildEnvironment()
 
         # The appDirKey is a optional entry in either the default or individual test
         # sections that defines a relative application directory for test runs. If