/usr/lib/pardus/pisi/installdb.py:113: (list) shadows builtin
/usr/lib/pardus/pisi/installdb.py:122: (dict) shadows builtin installdb.py:17: Imported module (os) not used installdb.py:18: Imported module (fcntl) not used
This commit is contained in:
+6
-10
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user