Commit 46edd99b authored by Rafael Monnerat's avatar Rafael Monnerat

agent: Read configuration file only once.

parent 97eb5452
...@@ -180,13 +180,14 @@ def main(): ...@@ -180,13 +180,14 @@ def main():
logger, log_file = getLogger(log, args.verbose) logger, log_file = getLogger(log, args.verbose)
configuration = ConfigParser.SafeConfigParser()
configuration.readfp(args.configuration_file)
pidfile = args.pidfile pidfile = args.pidfile
if pidfile: if pidfile:
setRunning(logger=logger, pidfile=pidfile) setRunning(logger=logger, pidfile=pidfile)
try: try:
while True: while True:
configuration = ConfigParser.SafeConfigParser()
configuration.readfp(args.configuration_file)
section_dict = loadConfiguration(configuration, logger) section_dict = loadConfiguration(configuration, logger)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment