mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Revert "make logging python3 compatible"
This reverts commit 74531c6e69c31c252a48d2bab90bc98e4f566111.
This commit is contained in:
+7
-6
@@ -44,7 +44,7 @@ def get_config_data():
|
||||
except:
|
||||
log.critical("ERROR: Could not execute: %s" % config_cmd)
|
||||
sys.exit(2)
|
||||
return proc.communicate()[0].decode()
|
||||
return proc.communicate()[0]
|
||||
|
||||
try:
|
||||
with open(config_file) as f:
|
||||
@@ -60,12 +60,13 @@ except:
|
||||
sys.exit(2)
|
||||
|
||||
try:
|
||||
log.setLevel(config['poller_service_loglevel'].upper())
|
||||
loglevel = logging.getLevelName(config['poller_service_loglevel'].upper())
|
||||
except KeyError:
|
||||
log.setLevel('INFO')
|
||||
except ValueError:
|
||||
log.warning('ERROR: {0} is not a valid log level'.format(config['poller_service_loglevel']))
|
||||
log.setLevel('INFO')
|
||||
loglevel = logging.getLevelName('INFO')
|
||||
if not isinstance(loglevel, int):
|
||||
log.warning('ERROR: {0} is not a valid log level'.format(str(loglevel)))
|
||||
loglevel = logging.getLevelName('INFO')
|
||||
log.setLevel(loglevel)
|
||||
|
||||
poller_path = config['install_dir'] + '/poller.php'
|
||||
discover_path = config['install_dir'] + '/discovery.php'
|
||||
|
||||
Reference in New Issue
Block a user