[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [gettor/master] Fix filename



commit aeef59acbb160792ce1edba990ee7c5e24c13354
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date:   Fri Oct 18 13:48:31 2019 +0200

    Fix filename
---
 gettor/utils/options.py  |  5 +++--
 gettor/utils/settings.py | 10 +++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/gettor/utils/options.py b/gettor/utils/options.py
index 54b9204..d313876 100644
--- a/gettor/utils/options.py
+++ b/gettor/utils/options.py
@@ -16,7 +16,7 @@ import argparse
 from .settings import Settings
 from . import strings
 
-def load_settings(config=None):
+def load_settings(config):
     """
     Loading settings, optionally from a custom config json file.
     """
@@ -31,4 +31,5 @@ def parse_settings():
     returing translated strings
     """
     strings.load_strings("en")
-    return load_settings(config='gettor.conf.json')
+    config = "/home/gettor/gettor/gettor.conf.json"
+    return load_settings(config)
diff --git a/gettor/utils/settings.py b/gettor/utils/settings.py
index 0543ad8..a519755 100644
--- a/gettor/utils/settings.py
+++ b/gettor/utils/settings.py
@@ -24,16 +24,16 @@ class Settings(object):
     """
     This class stores all of the settings for GetTor
     """
-    def __init__(self, config=False):
+    def __init__(self, config):
 
 
         # If a readable config file was provided, use that instead
         if config:
             if os.path.isfile(config):
                 self.filename = config
-
-        # Default config
-        self.filename = self.build_filename()
+        else:
+            # Default config
+            self.filename = self.build_filename()
 
         # Dictionary of available languages,
         # mapped to the language name, in that language
@@ -45,7 +45,7 @@ class Settings(object):
         """
         Returns the path of the settings file.
         """
-        return strings.get_resource_path('gettor.conf.json', strings.find_run_dir())
+        return strings.get_resource_path('/home/gettor/gettor/gettor.conf.json', strings.find_run_dir())
 
     def load(self):
         """

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits