check for required configuration variables

This commit is contained in:
Josh Holtrop 2011-07-06 18:18:50 -04:00
parent 6676dea967
commit 2f28e4bd5e

View File

@ -41,6 +41,14 @@ def main(argv):
config_fname = argv[1]
conf = get_config(config_fname)
if not ('server' in conf
and 'port' in conf
and 'user' in conf
and 'password' in conf):
sys.stderr.write(
'Must specify server, port, user, and password'
' in configuration file\n')
return 1
window = Window(conf)
window.run()