Fix logging faction name in stale influence check.
authorCMDR furrycat <elite@furrycat.net>
Thu, 11 May 2017 09:28:43 +0000 (10:28 +0100)
committerCMDR furrycat <elite@furrycat.net>
Thu, 11 May 2017 09:28:43 +0000 (10:28 +0100)
plugin/faction/faction.py

index 0ab1857..d8bdedc 100644 (file)
@@ -126,9 +126,11 @@ class Faction(DBConnection):
 
   def get_faction_name(self, id):
     cursor = self.query('select name from faction_names where id=?', [id])
+    name = None
     for row in cursor.fetchone():
-      yield row['name']
+      name = row['name']
     self.close_db()
+    return name
 
   def cache_system(self, *, id, name):
     cursor = self.query('insert or ignore into faction_systems values (?, ?)', [id, name])