Revert "make logging python3 compatible"

This reverts commit 74531c6e69c31c252a48d2bab90bc98e4f566111.
This commit is contained in:
Clint Armstrong
2015-08-25 11:35:23 -04:00
parent 0f34042b84
commit 85aa9ccdb8
+7 -6
View File
@@ -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'