Commit a32c1402 authored by Nick Mathewson's avatar Nick Mathewson 🎨
Browse files

r17298@catbus: nickm | 2007-12-21 00:44:11 -0500

 try to fix exception when STATUS_FILE is not configured.


svn:r12892
parent f294e547
......@@ -116,7 +116,7 @@ def load(cfg, splitter):
"""
logging.info("Loading bridges")
status = {}
if cfg.STATUS_FILE:
if hasattr(cfg, "STATUS_FILE"):
f = open(cfg.STATUS_FILE, 'r')
for ID, running in Bridges.parseStatusFile(f):
status[ID] = running
......@@ -140,7 +140,8 @@ def startup(cfg):
# Expand any ~ characters in paths in the configuration.
cfg.BRIDGE_FILES = [ os.path.expanduser(fn) for fn in cfg.BRIDGE_FILES ]
for key in ("RUN_IN_DIR", "DB_FILE", "DB_LOG_FILE", "MASTER_KEY_FILE",
"HTTPS_CERT_FILE", "HTTPS_KEY_FILE", "PIDFILE", "LOGFILE"):
"HTTPS_CERT_FILE", "HTTPS_KEY_FILE", "PIDFILE", "LOGFILE",
"STATUS_FILE"):
v = getattr(cfg, key)
if v:
setattr(cfg, key, os.path.expanduser(v))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment