mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 908296 - Catch all exceptions when importing psutil; r=ted
--HG-- extra : rebase_source : 7260ae283344fd8db3ef22923c33f9dc2166cc5f
This commit is contained in:
parent
74a66227cb
commit
273f9e99ae
@ -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
|
||||
|
@ -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 (
|
||||
|
Loading…
Reference in New Issue
Block a user