Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gurveervirk committed Aug 31, 2024
1 parent 931a979 commit 5c16655
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tok/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ def create_directory_if_not_exists(directory):
def load_settings():
global settings
try:
with open('settings.json', 'r') as f:
with open('settings.json', 'r+') as f:
settings = json.load(f)
if type(settings["password"]) != str:
settings["password"] = str(settings["password"])
json.dump(settings, f)
except FileNotFoundError:
print("The settings file doesn't exist. Creating a new one...")
settings = {
Expand Down

0 comments on commit 5c16655

Please sign in to comment.