Bug 1415245 - Follow-up: work around intermittent psutil import error, on a CLOSED TREE
authorGeoff Brown <gbrown@mozilla.com>
Wed, 08 Nov 2017 10:55:29 -0700
changeset 444090 24468798c7a6bd80e63351cf0c8842cda4ace7e3
parent 444089 fa9f36b16c03eaf55259281c5b11c557cde06518
child 444091 cc25abc4eab682a2c9881cf0d81343bc28ef34f0
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1415245
milestone58.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 1415245 - Follow-up: work around intermittent psutil import error, on a CLOSED TREE
testing/mozharness/scripts/desktop_unittest.py
--- a/testing/mozharness/scripts/desktop_unittest.py
+++ b/testing/mozharness/scripts/desktop_unittest.py
@@ -669,17 +669,20 @@ class DesktopUnittest(TestingMixin, Merc
         except:
             f.write("Exception getting system info: %s" % sys.exc_info()[0])
 
     def _report_system_info(self):
         """
            Create the system-info.log artifact file, containing a variety of
            system information that might be useful in diagnosing test failures.
         """
-        import psutil
+        try:
+            import psutil
+        except:
+            return
         dir = self.query_abs_dirs()['abs_blob_upload_dir']
         self.mkdir_p(dir)
         path = os.path.join(dir, "system-info.log")
         with open(path, "w") as f:
             self._report_line(f, "System info collected at ", datetime.now())
             self._report_line(f, "\nBoot time ", datetime.fromtimestamp(psutil.boot_time()))
             self._report_line(f, "\nVirtual memory: ", psutil.virtual_memory())
             self._report_line(f, "\nDisk partitions: ", psutil.disk_partitions())