handle pidfile missing from cfg.py

This commit is contained in:
James Vasile 2013-02-05 18:46:10 -05:00
parent c50029c2ec
commit cba61a0847

View File

@ -81,8 +81,12 @@ def parse_arguments():
if args.pidfile: if args.pidfile:
cfg.pidfile = args.pidfile cfg.pidfile = args.pidfile
else: else:
if not cfg.pidfile: try:
if not cfg.pidfile:
cfg.pidfile = "plinth.pid" cfg.pidfile = "plinth.pid"
except AttributeError:
cfg.pidfile = "plinth.pid"
if args.listen_exmachina_key: if args.listen_exmachina_key:
# this is where we optionally try to read in a shared secret key to # this is where we optionally try to read in a shared secret key to
# authenticate connections to exmachina # authenticate connections to exmachina