mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-01-07 23:11:50 +08:00
Removed Semaphore for configuration file
This commit is contained in:
parent
06dd641274
commit
e2c8b3bf02
1 changed files with 0 additions and 5 deletions
|
@ -519,7 +519,6 @@ Flask Functions
|
||||||
# Before request
|
# Before request
|
||||||
@app.before_request
|
@app.before_request
|
||||||
def auth_req():
|
def auth_req():
|
||||||
sem.acquire(timeout=1)
|
|
||||||
conf = get_dashboard_conf()
|
conf = get_dashboard_conf()
|
||||||
req = conf.get("Server", "auth_req")
|
req = conf.get("Server", "auth_req")
|
||||||
session['update'] = UPDATE
|
session['update'] = UPDATE
|
||||||
|
@ -536,10 +535,6 @@ def auth_req():
|
||||||
else:
|
else:
|
||||||
session['message'] = ""
|
session['message'] = ""
|
||||||
conf.clear()
|
conf.clear()
|
||||||
try:
|
|
||||||
sem.release()
|
|
||||||
except RuntimeError as e:
|
|
||||||
print("RuntimeError: cannot release un-acquired lock")
|
|
||||||
return redirect(url_for("signin"))
|
return redirect(url_for("signin"))
|
||||||
else:
|
else:
|
||||||
if request.endpoint in ['signin', 'signout', 'auth', 'settings', 'update_acct', 'update_pwd',
|
if request.endpoint in ['signin', 'signout', 'auth', 'settings', 'update_acct', 'update_pwd',
|
||||||
|
|
Loading…
Reference in a new issue