Bug 1202102 - s/CalledProcessError/subprocess.CalledProcessError/ r?dminor draft
authorRob Wu <rob@robwu.nl>
Mon, 01 Aug 2016 19:01:12 -0700
changeset 395321 db38307ff18a4e4d7a66e497a90f41bb47879bfe
parent 394995 ffac2798999c5b84f1b4605a1280994bb665a406
child 526976 ff9b72dcbe70f6f44546bf0aabba21bfe78865f8
push id24749
push userbmo:rob@robwu.nl
push dateTue, 02 Aug 2016 02:02:15 +0000
reviewersdminor
bugs1202102
milestone51.0a1
Bug 1202102 - s/CalledProcessError/subprocess.CalledProcessError/ r?dminor MozReview-Commit-ID: IxtsQCQbAE2
testing/remotecppunittests.py
testing/xpcshell/remotexpcshelltests.py
--- a/testing/remotecppunittests.py
+++ b/testing/remotecppunittests.py
@@ -71,32 +71,32 @@ class RemoteCPPUnitTests(cppunittests.CP
                     if info.filename.endswith(".so"):
                         print >> sys.stderr, "Pushing %s.." % info.filename
                         remote_file = posixpath.join(self.remote_bin_dir, os.path.basename(info.filename))
                         apk_contents.extract(info, tmpdir)
                         local_file = os.path.join(tmpdir, info.filename)
                         if szip:
                             try:
                                 out = subprocess.check_output([szip, '-d', local_file], stderr=subprocess.STDOUT)
-                            except CalledProcessError:
+                            except subprocess.CalledProcessError:
                                 print >> sys.stderr, "Error calling %s on %s.." % (szip, local_file)
                                 if out:
                                     print >> sys.stderr, out
                         self.device.pushFile(local_file, remote_file)
 
         elif self.options.local_lib:
             for file in os.listdir(self.options.local_lib):
                 if file.endswith(".so"):
                     print >> sys.stderr, "Pushing %s.." % file
                     remote_file = posixpath.join(self.remote_bin_dir, file)
                     local_file = os.path.join(self.options.local_lib, file)
                     if szip:
                         try:
                             out = subprocess.check_output([szip, '-d', local_file], stderr=subprocess.STDOUT)
-                        except CalledProcessError:
+                        except subprocess.CalledProcessError:
                             print >> sys.stderr, "Error calling %s on %s.." % (szip, local_file)
                             if out:
                                 print >> sys.stderr, out
                     self.device.pushFile(local_file, remote_file)
             # Additional libraries may be found in a sub-directory such as "lib/armeabi-v7a"
             for subdir in ["assets", "lib"]:
                 local_arm_lib = os.path.join(self.options.local_lib, subdir)
                 if os.path.isdir(local_arm_lib):
@@ -104,17 +104,17 @@ class RemoteCPPUnitTests(cppunittests.CP
                         for file in files:
                             if (file.endswith(".so")):
                                 print >> sys.stderr, "Pushing %s.." % file
                                 remote_file = posixpath.join(self.remote_bin_dir, file)
                                 local_file = os.path.join(root, file)
                                 if szip:
                                     try:
                                         out = subprocess.check_output([szip, '-d', local_file], stderr=subprocess.STDOUT)
-                                    except CalledProcessError:
+                                    except subprocess.CalledProcessError:
                                         print >> sys.stderr, "Error calling %s on %s.." % (szip, local_file)
                                         if out:
                                             print >> sys.stderr, out
                                 self.device.pushFile(local_file, remote_file)
 
     def push_progs(self, progs):
         for local_file in progs:
             remote_file = posixpath.join(self.remote_bin_dir, os.path.basename(local_file))
--- a/testing/xpcshell/remotexpcshelltests.py
+++ b/testing/xpcshell/remotexpcshelltests.py
@@ -451,17 +451,17 @@ class XPCShellRemote(xpcshell.XPCShellTe
                     if info.filename.endswith(".so"):
                         print >> sys.stderr, "Pushing %s.." % info.filename
                         remoteFile = remoteJoin(self.remoteBinDir, os.path.basename(info.filename))
                         self.localAPKContents.extract(info, dir)
                         localFile = os.path.join(dir, info.filename)
                         if szip:
                             try:
                                 out = subprocess.check_output([szip, '-d', localFile], stderr=subprocess.STDOUT)
-                            except CalledProcessError:
+                            except subprocess.CalledProcessError:
                                 print >> sys.stderr, "Error calling %s on %s.." % (szip, localFile)
                                 if out:
                                     print >> sys.stderr, out
                         self.device.pushFile(localFile, remoteFile)
                         pushed_libs_count += 1
             finally:
                 shutil.rmtree(dir)
             return pushed_libs_count
@@ -471,17 +471,17 @@ class XPCShellRemote(xpcshell.XPCShellTe
                 print >> sys.stderr, "Pushing %s.." % file
                 if 'libxul' in file:
                     print >> sys.stderr, "This is a big file, it could take a while."
                 localFile = os.path.join(self.localLib, file)
                 remoteFile = remoteJoin(self.remoteBinDir, file)
                 if szip:
                     try:
                         out = subprocess.check_output([szip, '-d', localFile], stderr=subprocess.STDOUT)
-                    except CalledProcessError:
+                    except subprocess.CalledProcessError:
                         print >> sys.stderr, "Error calling %s on %s.." % (szip, localFile)
                         if out:
                             print >> sys.stderr, out
                 self.device.pushFile(localFile, remoteFile)
                 pushed_libs_count += 1
 
         # Additional libraries may be found in a sub-directory such as "lib/armeabi-v7a"
         localArmLib = os.path.join(self.localLib, "lib")
@@ -490,17 +490,17 @@ class XPCShellRemote(xpcshell.XPCShellTe
                 for file in files:
                     if (file.endswith(".so")):
                         print >> sys.stderr, "Pushing %s.." % file
                         localFile = os.path.join(root, file)
                         remoteFile = remoteJoin(self.remoteBinDir, file)
                         if szip:
                             try:
                                 out = subprocess.check_output([szip, '-d', localFile], stderr=subprocess.STDOUT)
-                            except CalledProcessError:
+                            except subprocess.CalledProcessError:
                                 print >> sys.stderr, "Error calling %s on %s.." % (szip, localFile)
                                 if out:
                                     print >> sys.stderr, out
                         self.device.pushFile(localFile, remoteFile)
                         pushed_libs_count += 1
 
         return pushed_libs_count