Browse Source

Fix all tests

Oz N Tiram 8 years ago
parent
commit
a0c969c3ad
1 changed files with 2 additions and 0 deletions
  1. 2 0
      pwman/data/database.py

+ 2 - 0
pwman/data/database.py

@@ -164,6 +164,8 @@ class Database(object):
             sql = "SELECT * FROM NODE"
         self._cur.execute(sql, (ids))
         nodes = self._cur.fetchall()
+        if not nodes:
+            return []
         # sqlite returns nodes as bytes, postgresql returns them as str
         if isinstance(nodes[0][1], str):
             nodes = [node for node in nodes]