From: Torsten Werner Date: Thu, 13 Jan 2011 18:31:18 +0000 (+0100) Subject: Really, really fix DebVersion. X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=eaf6ec5ff6d6e2678ff84de0c3781beed8967a65;p=dak.git Really, really fix DebVersion. Signed-off-by: Torsten Werner --- diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 9e1b29bb..bae2bb35 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -64,7 +64,14 @@ from dak_exceptions import NoSourceFieldError # Patch in support for the debversion field type so that it works during # reflection -class DebVersion(sqltypes.UserDefinedType): +try: + # that is for sqlalchemy 0.6 + UserDefinedType = sqltypes.UserDefinedType +except: + # this one for sqlalchemy 0.5 + UserDefinedType = sqltypes.TypeEngine + +class DebVersion(UserDefinedType): def get_col_spec(self): return "DEBVERSION"