From dc922f3bb6a64fc9172b3650bbaf7a4a60d8e6c9 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Fri, 11 May 2012 12:54:12 +0200 Subject: [PATCH] Move "import utils" into function This breaks a dependency cycle (as utils.py imports dbconn.py again) and allows the tests to pass again. --- daklib/dbconn.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 80a1f233..c0801b42 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -75,7 +75,6 @@ from sqlalchemy.orm.exc import NoResultFound from config import Config from textutils import fix_maintainer from dak_exceptions import DBUpdateError, NoSourceFieldError, FileExistsError -import utils # suppress some deprecation warnings in squeeze related to sqlalchemy import warnings @@ -559,7 +558,7 @@ class DBBinary(ORMObject): @rtype: text @return: stanza text of the control section. ''' - import apt_inst + import utils fullpath = self.poolfile.fullpath deb_file = open(fullpath, 'r') stanza = utils.deb_extract_control(deb_file) -- 2.39.5