From a1379f05ab9d44de3ccfd08206390ede8da61ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Tue, 22 May 2007 16:24:10 +0000 Subject: [PATCH] [merge] cleanup from -catbox branch --- pisi/installdb.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pisi/installdb.py b/pisi/installdb.py index 6c826085..6ef21efa 100644 --- a/pisi/installdb.py +++ b/pisi/installdb.py @@ -13,10 +13,6 @@ # installation database # -# System -import os -import fcntl - import gettext __trans = gettext.translation('pisi', fallback=True) _ = __trans.ugettext @@ -110,20 +106,20 @@ class InstallDB: def list_installed(self, txn = None): def proc(txn): - list = [] + l = [] for (pkg, info) in self.d.items(txn): if info.state=='i' or info.state=='ip': - list.append(pkg) - return list + l.append(pkg) + return l return self.d.txn_proc(proc, txn) def list_pending(self): # warning: reads the entire db - dict = {} + d = {} for (pkg, x) in self.dp.items(): pkginfo = self.d[pkg] - dict[pkg] = pkginfo - return dict + d[pkg] = pkginfo + return d def get_info(self, pkg): pkg = str(pkg)