[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [gettor/master] Fix edge case where config file never declared
commit 34e912bbb3b9815469f1d2afe30c34bb6d588a4b
Author: Cecylia Bocovich <cohosh@xxxxxxxxxxxxxx>
Date: Mon Jan 20 17:27:03 2020 -0500
Fix edge case where config file never declared
This commit fixes an edge case in which the config filename is never
declared if the config is set but the file does not exist on disk.
---
gettor/utils/settings.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gettor/utils/settings.py b/gettor/utils/settings.py
index 67c31ec..4583b6a 100644
--- a/gettor/utils/settings.py
+++ b/gettor/utils/settings.py
@@ -28,9 +28,8 @@ class Settings(object):
# If a readable config file was provided, use that instead
- if config:
- if os.path.isfile(config):
- self.filename = config
+ if config and os.path.isfile(config):
+ self.filename = config
else:
# Default config
default_config = "/home/gettor/gettor/gettor.conf.json"
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits