db is now passed in the state structure
Change-Id: I8f51d57cf841b9e0da8dbf2b535d54ce4e35c016
diff --git a/util.py b/util.py
index f9b19e2..939d7e9 100644
--- a/util.py
+++ b/util.py
@@ -16,11 +16,12 @@
return class_(switch)
# Simple helper wrapper for all the read-only database queries
- def perform_db_query(self, db, command, data):
+ def perform_db_query(self, state, command, data):
print 'perform_db_query'
print command
print data
ret = {}
+ db = state.db
try:
if command == 'db.all_switches':
ret = db.all_switches()