diff options
| author | Scott <[email protected]> | 2022-02-02 13:47:36 -0800 |
|---|---|---|
| committer | Scott <[email protected]> | 2022-02-02 13:47:36 -0800 |
| commit | 7ff2af6fe7bffea90dc4a31c93140c189917c659 (patch) | |
| tree | 34cb138c3a572037b5bc1d1b52ad9d25a2604ccb /logging_utils.py | |
| parent | 6ba90a1f30f1c0cf4df12fcd0c62181f29bc3668 (diff) | |
Let's be explicit with asserts; there was a bug in histogram
caused by assert foo when foo was an int with valid valid 0.
Diffstat (limited to 'logging_utils.py')
| -rw-r--r-- | logging_utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/logging_utils.py b/logging_utils.py index fdbb7a3..3fd2b84 100644 --- a/logging_utils.py +++ b/logging_utils.py @@ -511,7 +511,7 @@ def initialize_logging(logger=None) -> logging.Logger: if config.config['logging_syslog_facility']: facility_name = 'LOG_' + config.config['logging_syslog_facility'] facility = SysLogHandler.__dict__.get(facility_name, SysLogHandler.LOG_USER) # type: ignore - assert facility + assert facility is not None handler = SysLogHandler(facility=facility, address='/dev/log') handler.setFormatter( MillisecondAwareFormatter( |
