aboutsummaryrefslogtreecommitdiff
path: root/onionshare/settings.py
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2019-10-20 10:15:16 -0700
committerMicah Lee <micah@micahflee.com>2019-10-20 10:15:16 -0700
commitb9a7361d9c93dc22241ad6d2304e3f76906aa036 (patch)
tree4ce450473a2a59496585e457ca2b109626eb73b6 /onionshare/settings.py
parent4dba1b0a31d747070cb8a48637564fbce93bccaa (diff)
downloadonionshare-b9a7361d9c93dc22241ad6d2304e3f76906aa036.tar.gz
onionshare-b9a7361d9c93dc22241ad6d2304e3f76906aa036.zip
Replace .format with python 3.6 f-strings in onionshare module
Diffstat (limited to 'onionshare/settings.py')
-rw-r--r--onionshare/settings.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/onionshare/settings.py b/onionshare/settings.py
index 25a28350..00854204 100644
--- a/onionshare/settings.py
+++ b/onionshare/settings.py
@@ -190,9 +190,7 @@ class Settings(object):
# If the settings file exists, load it
if os.path.exists(self.filename):
try:
- self.common.log(
- "Settings", "load", "Trying to load {}".format(self.filename)
- )
+ self.common.log("Settings", "load", f"Trying to load {self.filename}")
with open(self.filename, "r") as f:
self._settings = json.load(f)
self.fill_in_defaults()
@@ -211,9 +209,7 @@ class Settings(object):
"""
self.common.log("Settings", "save")
open(self.filename, "w").write(json.dumps(self._settings, indent=2))
- self.common.log(
- "Settings", "save", "Settings saved in {}".format(self.filename)
- )
+ self.common.log("Settings", "save", f"Settings saved in {self.filename}")
def get(self, key):
return self._settings[key]