From eaf6ec5ff6d6e2678ff84de0c3781beed8967a65 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Thu, 13 Jan 2011 19:31:18 +0100 Subject: [PATCH] Really, really fix DebVersion. Signed-off-by: Torsten Werner --- daklib/dbconn.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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" -- 2.39.5