X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fupdate_db.py;h=b559e544dfe57982af3e7799936cb25a056efaa3;hb=35cd0972b5e14dc8727403e13fccd30776f3ae02;hp=5d5fef477b06972e57bc26b9ec937a283b7840b5;hpb=c48b357e4838eac6de79b0bd6ee5f8862d049dba;p=dak.git diff --git a/dak/update_db.py b/dak/update_db.py index 5d5fef47..b559e544 100755 --- a/dak/update_db.py +++ b/dak/update_db.py @@ -1,7 +1,11 @@ #!/usr/bin/env python -""" Database Update Main Script """ +""" Database Update Main Script + +@contact: Debian FTP Master # Copyright (C) 2008 Michael Casadevall +@license: GNU General Public License version 2 or later +""" # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,18 +30,22 @@ ################################################################################ -import psycopg2, sys, fcntl, os +import psycopg2 +import sys +import fcntl +import os import apt_pkg import time import errno from daklib import database from daklib import utils +from daklib.dak_exceptions import DBUpdateError ################################################################################ Cnf = None projectB = None -required_database_schema = 3 +required_database_schema = 12 ################################################################################ @@ -136,7 +144,7 @@ Updates dak's database schema to the lastest version. You should disable crontab sys.exit(0) for i in range (database_revision, required_database_schema): - print "updating databse schema from " + str(database_revision) + " to " + str(i+1) + print "updating database schema from " + str(database_revision) + " to " + str(i+1) try: dakdb = __import__("dakdb", globals(), locals(), ['update'+str(i+1)]) update_module = getattr(dakdb, "update"+str(i+1))