Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
alirezade authored and alirezade committed Jan 10, 2024
1 parent 712b5f2 commit 592bd5d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/ics_sim/connectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@ def set(self, key, value):
return value

except sqlite3.Error as e:
error('_set %s: ' % e.args[0])
error('_set in ICSSIM connection %s: ' % e.args[0])

def get(self, key):
print("reading key")
get_query = """SELECT {} FROM {} WHERE {} = ?""".format(
self._value,
self._name,
Expand All @@ -92,12 +91,10 @@ def get(self, key):
cursor = conn.cursor()
cursor.execute(get_query, [key])
record = cursor.fetchone()

print(f"read {key} with value {record}")
return record[0]

except sqlite3.Error as e:
error('_get %s: ' % e)
error('_get in ICSSIM connection %s: ' % e.args[0])


class MemcacheConnector(Connector):
Expand Down

0 comments on commit 592bd5d

Please sign in to comment.