]> rtime.felk.cvut.cz Git - linux-conf-perf.git/commitdiff
Fix database get_configsort
authorKarel Kočí <cynerd@email.cz>
Tue, 18 Aug 2015 09:07:58 +0000 (11:07 +0200)
committerKarel Kočí <cynerd@email.cz>
Tue, 18 Aug 2015 09:12:51 +0000 (11:12 +0200)
Previous implementation was returning list of tuples. Now it is
returning list of strings.

scripts/database.py

index 82931b080c62f69a98d0c07c52307aa13a1fa16a..01c341a8b2ae22f3b215cd90c5ff88fcd0850ab5 100644 (file)
@@ -150,7 +150,11 @@ class database:
 
        def get_configsort(self):
                "Returns sorted list of all configuration options"
-               ps = self.db.prepare("""SELECT configopt FROM configopt
+               ps = self.db.prepare("""SELECT id, configopt FROM configopt
                                                                ORDER BY id ASC
                                                                """)
-               return ps()
+               rtn = []
+               itms = ps()
+               for id, config in itms:
+                       rtn.append(config)
+               return rtn