diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2023-04-10 23:48:49 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2023-04-10 23:48:49 +0200 |
commit | f11c0552f2bcfc8bc3afa35d29adb4dc5525c092 (patch) | |
tree | 79eadf1f560dcbc4f008975979e04f8e4cfbe57d /psutil/_common.py | |
parent | 6b8700270e2c32e876dfca081dbbec832aa4e7a0 (diff) | |
parent | 4dd1e215f3d49fb3a5074b82430bf6199c14898e (diff) | |
download | psutil-f11c0552f2bcfc8bc3afa35d29adb4dc5525c092.tar.gz |
merge from master
Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
Diffstat (limited to 'psutil/_common.py')
-rw-r--r-- | psutil/_common.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/psutil/_common.py b/psutil/_common.py index 74ae2557..92286746 100644 --- a/psutil/_common.py +++ b/psutil/_common.py @@ -43,7 +43,7 @@ else: # can't take it from _common.py as this script is imported by setup.py PY3 = sys.version_info[0] == 3 -PSUTIL_DEBUG = bool(os.getenv('PSUTIL_DEBUG', 0)) +PSUTIL_DEBUG = bool(os.getenv('PSUTIL_DEBUG')) _DEFAULT = object() __all__ = [ @@ -924,7 +924,7 @@ def debug(msg): """If PSUTIL_DEBUG env var is set, print a debug message to stderr.""" if PSUTIL_DEBUG: import inspect - fname, lineno, func_name, lines, index = inspect.getframeinfo( + fname, lineno, _, lines, index = inspect.getframeinfo( inspect.currentframe().f_back) if isinstance(msg, Exception): if isinstance(msg, (OSError, IOError, EnvironmentError)): |