duosecurity / duo_log_sync

MIT License
37 stars 28 forks source link

Error starting application in windows #1

Open john159753 opened 4 years ago

john159753 commented 4 years ago

Simple bug when running this on windows. Because i didn't have a /tmp folder, when i would try to start the application i was getting the following result, even though my config file was there.

C:>duologsync c:/config.yml ERROR:root:Config file not found at location c:/config.yml... ERROR:root:Please check path again...

Just quick and dirty discovery i changed the exception handling in the config_generator to spit out what was actually happening and thats when i discovered it wanted the tmp folder to exist.

except Exception as e
   logging.error("Config file not found at location {}...".format(config_file_path))
   logging.error("Please check path again...")
   logging.error(str(e))
   sys.exit(1)

C:\duo_log_sync>duologsync c:/config.yml ERROR:root:Config file not found at location c:/config.yml... ERROR:root:Please check path again... ERROR:root:[Errno 2] No such file or directory: 'C:\tmp\duologsync.log'

Not sure if it should just be a documentation improvement, or if the logging should be improved in config_generator.py.

cr45hmurphy commented 3 years ago

Had this same issue. I had to create a new directory named 'tmp' to get it to work. The script really needs to be looking for EITHER a tmp or a temp directory.