X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_policy_module%2Fcmd%2Fpolicy_module_agent.py;h=43dbc343c54b8b5e7d6eedc00c445b1b7dc405aa;hb=4584f8e86a492d67d120bfea1195eff1475c0a65;hp=e6c0681cdac4398af30a15460f20debdff482089;hpb=e8ee171063d81a02033729273793f5ba2c2b71cc;p=osm%2FPOL.git diff --git a/osm_policy_module/cmd/policy_module_agent.py b/osm_policy_module/cmd/policy_module_agent.py index e6c0681..43dbc34 100644 --- a/osm_policy_module/cmd/policy_module_agent.py +++ b/osm_policy_module/cmd/policy_module_agent.py @@ -34,19 +34,21 @@ from osm_policy_module.core.database import DatabaseManager def main(): # Cleanup old temp health file - if os.path.exists('/tmp/osm_pol_agent_health_flag'): - os.remove('/tmp/osm_pol_agent_health_flag') + if os.path.exists("/tmp/osm_pol_agent_health_flag"): + os.remove("/tmp/osm_pol_agent_health_flag") - parser = argparse.ArgumentParser(prog='osm-policy-agent') - parser.add_argument('--config-file', nargs='?', help='POL configuration file') + parser = argparse.ArgumentParser(prog="osm-policy-agent") + parser.add_argument("--config-file", nargs="?", help="POL configuration file") args = parser.parse_args() cfg = Config(args.config_file) root = logging.getLogger() - root.setLevel(logging.getLevelName(cfg.get('global', 'loglevel'))) + root.setLevel(logging.getLevelName(cfg.get("global", "loglevel"))) ch = logging.StreamHandler(sys.stdout) - ch.setLevel(logging.getLevelName(cfg.get('global', 'loglevel'))) - formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s', '%m/%d/%Y %I:%M:%S %p') + ch.setLevel(logging.getLevelName(cfg.get("global", "loglevel"))) + formatter = logging.Formatter( + "%(asctime)s - %(name)s - %(levelname)s - %(message)s", "%m/%d/%Y %I:%M:%S %p" + ) ch.setFormatter(formatter) root.addHandler(ch) @@ -62,5 +64,5 @@ def main(): agent.run() -if __name__ == '__main__': +if __name__ == "__main__": main()