Bug 908296 - Catch all exceptions when importing psutil; r=ted

--HG--
extra : rebase_source : 7260ae283344fd8db3ef22923c33f9dc2166cc5f
This commit is contained in:
Gregory Szorc 2013-08-23 10:50:28 -07:00
parent 74a66227cb
commit 273f9e99ae
2 changed files with 4 additions and 8 deletions

View File

@ -16,13 +16,9 @@ from collections import (
OrderedDict,
)
# keep in sync with psutil os support, see psutil/__init__.py
if sys.platform.startswith("freebsd") or sys.platform.startswith("darwin") or sys.platform.startswith("win32") or sys.platform.startswith("linux"):
try:
import psutil
except ImportError:
psutil = None
else:
try:
import psutil
except Exception:
psutil = None
from mozsystemmonitor.resourcemonitor import SystemResourceMonitor

View File

@ -9,7 +9,7 @@ import time
# psutil will raise NotImplementedError if the platform is not supported.
try:
import psutil
except (ImportError, NotImplementedError):
except Exception:
psutil = None
from collections import (