Skip to content

Commit a1e971f

Browse files
committed
Now strips id and name out of tuples before returning
1 parent 028aa61 commit a1e971f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

feshiedb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ def get_node_name(self, node_id):
432432
self.db.query(
433433
"SELECT name FROM current_names WHERE device_id = \"%s\";"
434434
% node_id)
435-
raw = self.db.store_result().fetch_row(0)
435+
raw = self.db.store_result().fetch_row(0)[0][0]
436436
return raw
437437

438438
def get_node_id(self, name):
@@ -441,7 +441,7 @@ def get_node_id(self, name):
441441
self.db.query(
442442
"SELECT device_id FROM current_names WHERE name = \"%s\";"
443443
% name)
444-
raw = self.db.store_result().fetch_row(0)
444+
raw = self.db.store_result().fetch_row(0)[0][0]
445445
return raw
446446

447447
class FeshieDbConfig(object):

0 commit comments

Comments
 (0)