X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/dd23aba113d3a3fb62804f6db620077d96b1d0e8..83e1cbb80dd1735daaf58ae5db95cd099992632c:/libcycript.py diff --git a/libcycript.py b/libcycript.py index 682e2d1..cd69d28 100755 --- a/libcycript.py +++ b/libcycript.py @@ -9,15 +9,15 @@ keys = {} for db in sys.argv[2:]: with sqlite3.connect(db) as sql: c = sql.cursor() - for name, system, value in c.execute('select name, system, value from cache'): - key = (name, value) + for name, system, flags, code in c.execute('select name, system, flags, code from cache'): + key = (name, flags, code) keys[key] = keys.get(key, 0) | system db = sys.argv[1] with sqlite3.connect(db) as sql: many = [] for key, system in keys.items(): - name, value = key - many.append((name, system, value)) + name, flags, code = key + many.append((name, system, flags, code)) c = sql.cursor() - c.executemany("insert into cache (name, system, value) values (?, ?, ?)", many) + c.executemany("insert into cache (name, system, flags, code) values (?, ?, ?, ?)", many)