Private GIT

Skip to content
Snippets Groups Projects
Commit b8d0638e authored by bone's avatar bone Committed by miigotu
Browse files

'is not' being used where '!=' should have been which causes the network...

'is not' being used where '!=' should have been which causes the network timezome table in cache.db to be rebuilt repeatedly

	http://stackoverflow.com/questions/2209755/python-operation-vs-is-not
parent 0b857acc
Branches
Tags
No related merge requests found
...@@ -65,7 +65,7 @@ def update_network_dict(): ...@@ -65,7 +65,7 @@ def update_network_dict():
existing = network in network_list existing = network in network_list
if not existing: if not existing:
queries.append(['INSERT OR IGNORE INTO network_timezones VALUES (?,?);', [network, timezone]]) queries.append(['INSERT OR IGNORE INTO network_timezones VALUES (?,?);', [network, timezone]])
elif network_list[network] is not timezone: elif network_list[network] != timezone:
queries.append(['UPDATE OR IGNORE network_timezones SET timezone = ? WHERE network_name = ?;', [timezone, network]]) queries.append(['UPDATE OR IGNORE network_timezones SET timezone = ? WHERE network_name = ?;', [timezone, network]])
if existing: if existing:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment