[or-cvs] r12892: try to fix exception when STATUS_FILE is not configured. (in bridgedb/trunk: . lib/bridgedb)
nickm at seul.org
nickm at seul.org
Fri Dec 21 05:44:13 UTC 2007
Author: nickm
Date: 2007-12-21 00:44:13 -0500 (Fri, 21 Dec 2007)
New Revision: 12892
Modified:
bridgedb/trunk/
bridgedb/trunk/lib/bridgedb/Main.py
Log:
r17298 at catbus: nickm | 2007-12-21 00:44:11 -0500
try to fix exception when STATUS_FILE is not configured.
Property changes on: bridgedb/trunk
___________________________________________________________________
svk:merge ticket from /bridgedb/trunk [r17298] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: bridgedb/trunk/lib/bridgedb/Main.py
===================================================================
--- bridgedb/trunk/lib/bridgedb/Main.py 2007-12-21 04:51:31 UTC (rev 12891)
+++ bridgedb/trunk/lib/bridgedb/Main.py 2007-12-21 05:44:13 UTC (rev 12892)
@@ -116,7 +116,7 @@
"""
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 @@
# 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))
More information about the tor-commits
mailing list