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 444084 e2f87726b6082db0ae8a0866f65bff6b7062a07c
parent 444083 21cccb0cb5fd5e685b4d5640eb50bba821caeea9
child 444085 a49a6fa54363f9541f2469598218fd0db946ec84
child 444137 b23e1d8de55e99fc32c4115d7f6190343030a5a6
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 MozReview-Commit-ID: KSGe1iYQpYw
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())