mirror of https://github.com/Aidaho12/haproxy-wi
Initialize oldstat at the top of the function
It is not essential but it is safer if the code is changed in the future... [flake8](http://flake8.pycqa.org) testing of https://github.com/Aidaho12/haproxy-wi on Python 3.7.0 $ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__ ``` /home/travis/virtualenv/python3.7.0/lib/python3.7/site-packages/pycodestyle.py:113: FutureWarning: Possible nested set at position 1 EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]') ./app/tools/checker_worker.py:70:27: F821 undefined name 'oldstat' if (currentstat[i] != oldstat[i] and currentstat[i]!="none") and ("FRONTEND" not in str(vips[i]) and "BACKEND" not in str(vips[i])): ^ 1 F821 undefined name 'oldstat' 1 ```pull/30/head
parent
c0dbf08f23
commit
e74db7c856
|
@ -22,6 +22,7 @@ def main(serv, port):
|
||||||
port = str(port)
|
port = str(port)
|
||||||
firstrun = True
|
firstrun = True
|
||||||
currentstat = []
|
currentstat = []
|
||||||
|
oldstat = []
|
||||||
readstats = ""
|
readstats = ""
|
||||||
killer = GracefulKiller()
|
killer = GracefulKiller()
|
||||||
old_stat_service = ""
|
old_stat_service = ""
|
||||||
|
|
Loading…
Reference in New Issue