summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b840ef0)
Signed-off-by: Joerg Jaspert <joerg@debian.org>
import psycopg2
from daklib.dak_exceptions import DBUpdateError
import psycopg2
from daklib.dak_exceptions import DBUpdateError
+from daklib.utils import get_conf
################################################################################
suites = {} #: Cache of existing suites
archs = {} #: Cache of existing architectures
################################################################################
suites = {} #: Cache of existing suites
archs = {} #: Cache of existing architectures
def do_update(self):
""" Execute the DB update """
print "Lets make suite_architecture table use sane values"
def do_update(self):
""" Execute the DB update """
print "Lets make suite_architecture table use sane values"
query = "INSERT into suite_architectures (suite, architecture) VALUES (%s, %s)" #: Update query
try:
query = "INSERT into suite_architectures (suite, architecture) VALUES (%s, %s)" #: Update query
try:
architectures = Cnf.SubTree("Suite::" + suite).ValueList("Architectures")
suite = suite.lower()
for arch in architectures:
architectures = Cnf.SubTree("Suite::" + suite).ValueList("Architectures")
suite = suite.lower()
for arch in architectures:
- c.execute(query, suites[suite], archs[arch])
+ c.execute(query, [suites[suite], archs[arch]])