[Demi-commits] r78 - lib
John Morrissey
jwm-guest at costa.debian.org
Mon Apr 24 18:21:15 UTC 2006
Author: jwm-guest
Date: 2006-04-24 18:21:15 +0000 (Mon, 24 Apr 2006)
New Revision: 78
Modified:
lib/demi.py
Log:
only import apt_pkg when needed, so demi-agent doesn't need to Depends: on
python-apt
Modified: lib/demi.py
===================================================================
--- lib/demi.py 2006-02-13 21:30:02 UTC (rev 77)
+++ lib/demi.py 2006-04-24 18:21:15 UTC (rev 78)
@@ -16,13 +16,15 @@
#
# $Id$
-import apt_pkg, MySQLdb, pytz, re, syslog
+import MySQLdb, pytz, re, syslog
import config
aptSources = aptCache = aptRecords = None
syslog.openlog("demi")
def initApt():
+ import apt_pkg
+
apt_pkg.init()
Cnf = apt_pkg.newConfiguration()
Cnf.Set("quiet", "2");
@@ -61,6 +63,8 @@
if ver1 == None or ver2 == None:
return 0
+
+ import apt_pkg
return apt_pkg.VersionCompare(ver1, ver2);
def stripVersionEpoch(version):
More information about the Demi-commits
mailing list