Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Anti-censorship
BridgeDB
Commits
a32c1402
Commit
a32c1402
authored
Dec 21, 2007
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/bridgedb/Main.py
View file @
a32c1402
...
...
@@ -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
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment