summaryrefslogtreecommitdiff
path: root/apt/cache.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-08-04 08:32:54 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-08-04 08:32:54 +0000
commit6a8d39c2770b9640a51d8d8d8fed10e65e5d2336 (patch)
treeb316611639f4707247a0a93174cb65567f0e1f72 /apt/cache.py
parent778a4b5fa470c03a598f3cf6f81ab73c3855f488 (diff)
downloadpython-apt-6a8d39c2770b9640a51d8d8d8fed10e65e5d2336.tar.gz
* making the interface cleaner (thanks to jamesh): added proerties in the Package class
Diffstat (limited to 'apt/cache.py')
-rw-r--r--apt/cache.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 7ec99c22..6f301b8a 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -25,10 +25,10 @@ from apt.progress import OpTextProgress
from UserDict import UserDict
class Cache(object):
- """ Dictionary-like package cache
- This class has all the packages that are available in it's
- dictionary
- """
+ """ Dictionary-like package cache
+ This class has all the packages that are available in it's
+ dictionary
+ """
def __init__(self, progress=None):
self._callbacks = {}
@@ -221,18 +221,18 @@ if __name__ == "__main__":
c.connect("cache_post_change", cache_post_changed)
print c.has_key("aptitude")
p = c["aptitude"]
- print p.name()
+ print p.name
print len(c)
for pkg in c.keys():
- x= c[pkg].name()
+ x= c[pkg].name
c.upgrade()
changes = c.getChanges()
print len(changes)
for p in changes:
- #print p.name()
- x = p.name()
+ #print p.name
+ x = p.name
print "Testing filtered cache (argument is old cache)"
f = FilteredCache(c)
@@ -242,8 +242,8 @@ if __name__ == "__main__":
f.setFilter(MarkedChangesFilter())
print len(f)
for pkg in f.keys():
- #print c[pkg].name()
- x = f[pkg].name()
+ #print c[pkg].name
+ x = f[pkg].name
print len(f)
@@ -255,7 +255,7 @@ if __name__ == "__main__":
f.setFilter(MarkedChangesFilter())
print len(f)
for pkg in f.keys():
- #print c[pkg].name()
- x = f[pkg].name()
+ #print c[pkg].name
+ x = f[pkg].name
print len(f)