Skip to content
Permalink
Browse files

Improve use of os.path.join

  • Loading branch information...
nOOb3167 authored and sfan5 committed Mar 18, 2018
1 parent f5bddaa commit 23d45c0a15e30ce7f5293139f28e323295f0e154
Showing with 2 additions and 2 deletions.
  1. +2 −2 server.py
@@ -354,7 +354,7 @@ def purgeOld(self):
def load(self):
with self.lock:
try:
with open(os.path.join("static", "list.json"), "r") as fd:
with open(os.path.join(app.static_folder, "list.json"), "r") as fd:
data = json.load(fd)
except FileNotFoundError:
return
@@ -376,7 +376,7 @@ def save(self):
self.maxServers = max(servers, self.maxServers)
self.maxClients = max(clients, self.maxClients)

list_path = os.path.join(app.root_path, app.static_folder, "list.json")
list_path = os.path.join(app.static_folder, "list.json")
with open(list_path + "~", "w") as fd:
json.dump({
"total": {"servers": servers, "clients": clients},

0 comments on commit 23d45c0

Please sign in to comment.
You can’t perform that action at this time.