[merge] cleanup from -catbox branch

This commit is contained in:
S.Çağlar Onur
2007-05-22 16:24:10 +00:00
parent 37c2743f6f
commit a1379f05ab
+6 -10
View File
@@ -13,10 +13,6 @@
# installation database # installation database
# #
# System
import os
import fcntl
import gettext import gettext
__trans = gettext.translation('pisi', fallback=True) __trans = gettext.translation('pisi', fallback=True)
_ = __trans.ugettext _ = __trans.ugettext
@@ -110,20 +106,20 @@ class InstallDB:
def list_installed(self, txn = None): def list_installed(self, txn = None):
def proc(txn): def proc(txn):
list = [] l = []
for (pkg, info) in self.d.items(txn): for (pkg, info) in self.d.items(txn):
if info.state=='i' or info.state=='ip': if info.state=='i' or info.state=='ip':
list.append(pkg) l.append(pkg)
return list return l
return self.d.txn_proc(proc, txn) return self.d.txn_proc(proc, txn)
def list_pending(self): def list_pending(self):
# warning: reads the entire db # warning: reads the entire db
dict = {} d = {}
for (pkg, x) in self.dp.items(): for (pkg, x) in self.dp.items():
pkginfo = self.d[pkg] pkginfo = self.d[pkg]
dict[pkg] = pkginfo d[pkg] = pkginfo
return dict return d
def get_info(self, pkg): def get_info(self, pkg):
pkg = str(pkg) pkg = str(pkg)