Bug 1186896 - Fix import statements for mach update-uuids. r=gps
authorPeter Elmers <peter.elmers@yahoo.com>
Thu, 23 Jul 2015 08:00:02 -0700
changeset 254895 992a26539e87
parent 254894 df688ddb5dbe
child 254896 f1139a10e2c6
push id62890
push usercbook@mozilla.com
push dateTue, 28 Jul 2015 09:59:37 +0000
treeherdermozilla-inbound@ae9f773bab88 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1186896
milestone42.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 1186896 - Fix import statements for mach update-uuids. r=gps
tools/mach_commands.py
--- a/tools/mach_commands.py
+++ b/tools/mach_commands.py
@@ -69,17 +69,17 @@ class SearchProvider(object):
 
 
 class Interface(object):
     '''
     Represents an XPIDL interface, in what file it is defined, what it derives
     from, what its uuid is, and where in the source file the uuid is.
     '''
     def __init__(self, filename, production):
-        import xpidl
+        from xpidl import xpidl
         assert isinstance(production, xpidl.Interface)
         self.name = production.name
         self.base = production.base
         self.filename = filename
         self.uuid = production.attributes.uuid
         location = production.location
         data = location._lexdata
         attr_pos = data.rfind(b'[', 0, location._lexpos)
@@ -166,17 +166,17 @@ class UUIDProvider(object):
         description='Update IDL files with new UUIDs.')
     @CommandArgument('--path', default='.',
                      help='Base path under which uuids will be searched.')
     @CommandArgument('interfaces', nargs='+',
                      help='Changed interfaces whose UUIDs need to be updated. ' +
                           'Their descendants are updated as well.')
     def update_uuids(self, path, interfaces):
         import os
-        import xpidl
+        from xpidl import xpidl
         from mozpack.files import FileFinder
         import mozpack.path as mozpath
         from tempfile import mkdtemp
 
         finder = FileFinder(path, find_executables=False)
         # Avoid creating xpidllex and xpidlyacc in the current directory.
         tmpdir = mkdtemp()
         try: