From: Ansgar Burchardt Date: Fri, 11 May 2012 10:54:12 +0000 (+0200) Subject: Move "import utils" into function X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=dc922f3bb6a64fc9172b3650bbaf7a4a60d8e6c9;p=dak.git Move "import utils" into function This breaks a dependency cycle (as utils.py imports dbconn.py again) and allows the tests to pass again. --- 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)