mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-02 19:36:08 -04:00
Made Settings debug log less verbose
This commit is contained in:
parent
4242097d7d
commit
18ba940669
1 changed files with 0 additions and 7 deletions
|
@ -58,8 +58,6 @@ class Settings(object):
|
||||||
If there are any missing settings from self._settings, replace them with
|
If there are any missing settings from self._settings, replace them with
|
||||||
their default values.
|
their default values.
|
||||||
"""
|
"""
|
||||||
common.log('Settings', 'fill_in_defaults')
|
|
||||||
|
|
||||||
for key in self.default_settings:
|
for key in self.default_settings:
|
||||||
if key not in self._settings:
|
if key not in self._settings:
|
||||||
self._settings[key] = self.default_settings[key]
|
self._settings[key] = self.default_settings[key]
|
||||||
|
@ -68,8 +66,6 @@ class Settings(object):
|
||||||
"""
|
"""
|
||||||
Returns the path of the settings file.
|
Returns the path of the settings file.
|
||||||
"""
|
"""
|
||||||
common.log('Settings', 'build_filename')
|
|
||||||
|
|
||||||
p = platform.system()
|
p = platform.system()
|
||||||
if p == 'Windows':
|
if p == 'Windows':
|
||||||
appdata = os.environ['APPDATA']
|
appdata = os.environ['APPDATA']
|
||||||
|
@ -107,12 +103,9 @@ class Settings(object):
|
||||||
print(strings._('settings_saved').format(self.filename))
|
print(strings._('settings_saved').format(self.filename))
|
||||||
|
|
||||||
def get(self, key):
|
def get(self, key):
|
||||||
common.log('Settings', 'get', 'key={} (val={})'.format(key, self._settings[key]))
|
|
||||||
return self._settings[key]
|
return self._settings[key]
|
||||||
|
|
||||||
def set(self, key, val):
|
def set(self, key, val):
|
||||||
common.log('Settings', 'set', 'key={}, val={}'.format(key, val))
|
|
||||||
|
|
||||||
# If typecasting int values fails, fallback to default values
|
# If typecasting int values fails, fallback to default values
|
||||||
if key == 'control_port_port' or key == 'socks_port':
|
if key == 'control_port_port' or key == 'socks_port':
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue