From: Dominic Kanrabat Date: Wed, 24 Apr 2019 07:34:09 +0000 (-0400) Subject: Fixes MySQLdb feature X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=db66f7a1bb643c74b999318359168811f7610734;p=deefuzzer.git Fixes MySQLdb feature --- diff --git a/deefuzzer/station.py b/deefuzzer/station.py index 123b3f2..896b324 100644 --- a/deefuzzer/station.py +++ b/deefuzzer/station.py @@ -440,12 +440,18 @@ class Station(Thread): port = self.mdb_port, use_unicode = True) cur = con.cursor() - cur.execute("SELECT %s FROM %s".format(self.mdb_field, self.mdb_table)) - file_list = cur.fetchall() + cur.execute("SELECT %s FROM %s" % (self.mdb_field, self.mdb_table)) + rows = cur.fetchall() + for row in rows: + file_list.append(row[0]) except mdb.Error, e: self._err('Could not get playlist from MySQLdb, Error %d: %s' % (e.args[0], e.args[1])) + finally: + if con: + con.close() + # Directory elif os.path.isdir(self.media_source): self.q.get(1)