GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit aeef59ac authored by Hiro's avatar Hiro 🏄
Browse files

Fix filename

parent 6dafb82e
...@@ -16,7 +16,7 @@ import argparse ...@@ -16,7 +16,7 @@ import argparse
from .settings import Settings from .settings import Settings
from . import strings from . import strings
def load_settings(config=None): def load_settings(config):
""" """
Loading settings, optionally from a custom config json file. Loading settings, optionally from a custom config json file.
""" """
...@@ -31,4 +31,5 @@ def parse_settings(): ...@@ -31,4 +31,5 @@ def parse_settings():
returing translated strings returing translated strings
""" """
strings.load_strings("en") strings.load_strings("en")
return load_settings(config='gettor.conf.json') config = "/home/gettor/gettor/gettor.conf.json"
return load_settings(config)
...@@ -24,16 +24,16 @@ class Settings(object): ...@@ -24,16 +24,16 @@ class Settings(object):
""" """
This class stores all of the settings for GetTor 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 a readable config file was provided, use that instead
if config: if config:
if os.path.isfile(config): if os.path.isfile(config):
self.filename = config self.filename = config
else:
# Default config # Default config
self.filename = self.build_filename() self.filename = self.build_filename()
# Dictionary of available languages, # Dictionary of available languages,
# mapped to the language name, in that language # mapped to the language name, in that language
...@@ -45,7 +45,7 @@ class Settings(object): ...@@ -45,7 +45,7 @@ class Settings(object):
""" """
Returns the path of the settings file. 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): def load(self):
""" """
......
Markdown is supported
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