diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2018-10-12 17:56:58 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2018-10-12 17:56:58 +0200 |
commit | 2e220c8ae1b69299eb07bcbd419cf2f59837853d (patch) | |
tree | 792c07f17653b21fc0f74ecef56b40e74c0fa2c5 | |
parent | 1a0520d225053a818850b04e9b70ea8d3cce33a9 (diff) | |
download | psutil-2e220c8ae1b69299eb07bcbd419cf2f59837853d.tar.gz |
fix #715: do not print exception on import time in case cpu_times() fails.
-rw-r--r-- | HISTORY.rst | 1 | ||||
-rw-r--r-- | psutil/__init__.py | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/HISTORY.rst b/HISTORY.rst index a03b5ad2..735b9345 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -15,6 +15,7 @@ XXXX-XX-XX **Bug fixes** +- 715_: do not print exception on import time in case cpu_times() fails. - 1294_: [Windows] psutil.Process().connections() may sometimes fail with intermittent 0xC0000001. (patch by Sylvain Duchesne) - 1320_: [AIX] system CPU times (psutil.cpu_times()) were being reported with diff --git a/psutil/__init__.py b/psutil/__init__.py index 23dc1227..f43ef7b6 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -32,7 +32,6 @@ import signal import subprocess import sys import time -import traceback try: import pwd except ImportError: @@ -1609,14 +1608,12 @@ try: except Exception: # Don't want to crash at import time. _last_cpu_times = None - traceback.print_exc() try: _last_per_cpu_times = cpu_times(percpu=True) except Exception: # Don't want to crash at import time. _last_per_cpu_times = None - traceback.print_exc() def _cpu_tot_time(times): |