diff options
author | Tom Ritter <tom@ritter.vg> | 2016-01-25 22:05:41 -0500 |
---|---|---|
committer | Tom Ritter <tom@ritter.vg> | 2016-01-25 22:05:41 -0500 |
commit | 8b90db99774a48fcae3d4f74f94cee69d7fd2ed1 (patch) | |
tree | b797771e5ec66b204352626005464517d905631a | |
parent | 4a42c0a83c9b50600c26c5816c0d666a44910d10 (diff) |
Read the config file from the absolute path.
-rwxr-xr-x | main.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -28,7 +28,10 @@ if __name__ == "__main__": args = parser.parse_args() config = ConfigParser.ConfigParser() - config.read('settings.cfg') + configfile = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'settings.cfg') + if args.v: + print "[Pre-Logging] Reading config from", configfile + config.read(configfile) if not config.get('email', 'user') or \ not config.get('email', 'pass') or \ not config.get('email', 'smtpserver') or \ |