diff --git a/inotify/adapters.py b/inotify/adapters.py index e8301da..f1aeaff 100644 --- a/inotify/adapters.py +++ b/inotify/adapters.py @@ -34,7 +34,11 @@ ]) _STRUCT_HEADER_LENGTH = struct.calcsize(_HEADER_STRUCT_FORMAT) -_IS_DEBUG = bool(int(os.environ.get('DEBUG', '0'))) + +try: + _IS_DEBUG = bool(int(os.environ.get('DEBUG', '0'))) +except ValueError: + _IS_DEBUG = False class EventTimeoutException(Exception):