Bug 1547730 - use six.iterkeys() r=glandium
authorJustin Wood <Callek@gmail.com>
Tue, 28 May 2019 14:24:07 +0000
changeset 475893 1e4407c3c9e307af9ca79295ff224939039ff2c3
parent 475892 66933913a2dfe148b6770940d100f71ad0c87c99
child 475894 5588a24fd92cb79e6fba9dba660b7430b90b9e8d
push id86529
push userjwood@mozilla.com
push dateTue, 28 May 2019 14:47:17 +0000
treeherderautoland@dbadda4e3c1c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1547730
milestone69.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 1547730 - use six.iterkeys() r=glandium Differential Revision: https://phabricator.services.mozilla.com/D28119
python/mozbuild/mozbuild/jar.py
python/mozbuild/mozpack/test/test_packager_formats.py
--- a/python/mozbuild/mozbuild/jar.py
+++ b/python/mozbuild/mozbuild/jar.py
@@ -9,16 +9,17 @@ See the documentation for jar.mn on MDC 
 '''
 
 from __future__ import absolute_import, print_function
 
 import sys
 import os
 import errno
 import re
+import six
 import logging
 from time import localtime
 from MozZipFile import ZipFile
 from cStringIO import StringIO
 
 from mozbuild.preprocessor import Preprocessor
 from mozbuild.action.buildlist import addEntriesToListFile
 from mozbuild.util import ensure_bytes
@@ -301,17 +302,17 @@ class JarMaker(object):
                                      self.rootManifestAppId)])
 
     def updateManifest(self, manifestPath, chromebasepath, register):
         '''updateManifest replaces the % in the chrome registration entries
         with the given chrome base path, and updates the given manifest file.
         '''
         myregister = dict.fromkeys(map(lambda s: s.replace('%',
                                                            chromebasepath), register))
-        addEntriesToListFile(manifestPath, myregister.iterkeys())
+        addEntriesToListFile(manifestPath, six.iterkeys(myregister))
 
     def makeJar(self, infile, jardir):
         '''makeJar is the main entry point to JarMaker.
 
         It takes the input file, the output directory, the source dirs and the
         top source dir as argument, and optionally the l10n dirs.
         '''
 
--- a/python/mozbuild/mozpack/test/test_packager_formats.py
+++ b/python/mozbuild/mozpack/test/test_packager_formats.py
@@ -229,17 +229,17 @@ RESULT_OMNIJAR.update({
         for p in chain((
             'chrome.manifest',
             'chrome/chrome.manifest',
             'chrome/foo/foo',
             'components/components.manifest',
             'components/foo.js',
         ), (
             mozpath.relpath(p, 'app')
-            for p in RESULT_FLAT.iterkeys()
+            for p in six.iterkeys(RESULT_FLAT)
             if p.startswith('app/chrome/addons/addon2/')
         ))
     },
     'app/chrome.manifest': [],
 })
 
 RESULT_OMNIJAR['omni.foo'].update({
     p: RESULT_FLAT[p]