Permalink
Browse files

Throw an error when the configuration file for backend is missing. (I…

…ssue #10)
  • Loading branch information...
1 parent c5c1ec7 commit 9de00b850c23fb1efd9821cd39fef833774e1005 @micolous micolous committed Apr 20, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 tollgate/backend/tollgate_backend.py
View
5 tollgate/backend/tollgate_backend.py
@@ -80,7 +80,10 @@ def main(daemon_enable=True, settings_file=SETTINGS_FILE):
import daemon
print "Loading configuration: %s" % settings_file
- config.read(settings_file)
+
+ if not config.read(settings_file):
+ print "Failure reading configuration file!"
+ exit(1)
print "Setting configuration values..."
iptables.IPTABLES = config.get('tollgate', 'iptables')

0 comments on commit 9de00b8

Please sign in to comment.