Bug 1674162 Comment 1 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

This patch seems fine, but I don't know how to test it.

```
diff --git a/testing/mozbase/mozinstall/mozinstall/mozinstall.py b/testing/mozbase/mozinstall/mozinstall/mozinstall.py
index 4b6231888c7f..7822da5c123b 100644
--- a/testing/mozbase/mozinstall/mozinstall/mozinstall.py
+++ b/testing/mozbase/mozinstall/mozinstall/mozinstall.py
@@ -28,9 +28,6 @@ try:
 except ImportError:
     has_pefile = False
 
-if mozinfo.isMac:
-    from plistlib import readPlist
-
 
 TIMEOUT_UNINSTALL = 60
 
@@ -69,13 +66,15 @@ def get_binary(path, app_name):
 
     # On OS X we can get the real binary from the app bundle
     if mozinfo.isMac:
+        import plistlib
         plist = "%s/Contents/Info.plist" % path
         if not os.path.isfile(plist):
             raise InvalidBinary("%s/Contents/Info.plist not found" % path)
 
-        binary = os.path.join(
-            path, "Contents/MacOS/", readPlist(plist)["CFBundleExecutable"]
-        )
+        with open(plist, 'rb') as fp:
+            binary = os.path.join(
+                path, "Contents/MacOS/", plistlib.load(fp)["CFBundleExecutable"]
+            )
 
     else:
         app_name = app_name.lower()

```
This patch seems fine, but I don't know how to test it.

```
diff --git a/testing/mozbase/mozinstall/mozinstall/mozinstall.py b/testing/mozbase/mozinstall/mozinstall/mozinstall.py
index 4b6231888c7f..7822da5c123b 100644
--- a/testing/mozbase/mozinstall/mozinstall/mozinstall.py
+++ b/testing/mozbase/mozinstall/mozinstall/mozinstall.py
@@ -28,9 +28,6 @@ try:
 except ImportError:
     has_pefile = False
 
-if mozinfo.isMac:
-    from plistlib import readPlist
-
 
 TIMEOUT_UNINSTALL = 60
 
@@ -69,13 +66,15 @@ def get_binary(path, app_name):
 
     # On OS X we can get the real binary from the app bundle
     if mozinfo.isMac:
+        import plistlib
         plist = "%s/Contents/Info.plist" % path
         if not os.path.isfile(plist):
             raise InvalidBinary("%s/Contents/Info.plist not found" % path)
 
-        binary = os.path.join(
-            path, "Contents/MacOS/", readPlist(plist)["CFBundleExecutable"]
-        )
+        with open(plist, "rb") as fp:
+            binary = os.path.join(
+                path, "Contents/MacOS/", plistlib.load(fp)["CFBundleExecutable"]
+            )
 
     else:
         app_name = app_name.lower()

```

Back to Bug 1674162 Comment 1