mirror of
https://github.com/Xevion/thedrank.com.git
synced 2025-12-14 22:13:18 -06:00
fix global i
This commit is contained in:
@@ -8,7 +8,6 @@ viewcountpath = os.path.join('app', 'static', 'viewcount.dat')
|
||||
counter = Value('i', int(open(viewcountpath, 'r').read()))
|
||||
|
||||
def getIncrement(n=1):
|
||||
global i
|
||||
with counter.get_lock():
|
||||
counter.value += n
|
||||
open(viewcountpath, 'w').write(str(counter.value))
|
||||
|
||||
Reference in New Issue
Block a user