summaryrefslogtreecommitdiff
path: root/doc/examples/depcache.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-01-13 17:50:30 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2009-01-13 17:50:30 +0100
commit8b46b0c4bdfbaa07972311b1cf19616d5c5aff04 (patch)
tree59167b2b8c1d331bfebf072d5ba84dd154f0b373 /doc/examples/depcache.py
parent6c1711a80a8a7d011f4d5f49618ff396ad2f5722 (diff)
parent85839f4f241c99f9e4ebb0a6a8847a2d433f1160 (diff)
downloadpython-apt-8b46b0c4bdfbaa07972311b1cf19616d5c5aff04.tar.gz
merge from the debian experimental branch
Diffstat (limited to 'doc/examples/depcache.py')
-rw-r--r--doc/examples/depcache.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/examples/depcache.py b/doc/examples/depcache.py
index 556c954b..790cc9d6 100644
--- a/doc/examples/depcache.py
+++ b/doc/examples/depcache.py
@@ -84,7 +84,8 @@ print "UsrSize: %s " % apt_pkg.SizeToStr(depcache.UsrSize)
print "DebSize: %s " % apt_pkg.SizeToStr(depcache.DebSize)
for pkg in cache.Packages:
- if pkg.CurrentVer != None and not depcache.MarkedInstall(pkg) and depcache.IsUpgradable(pkg):
+ if pkg.CurrentVer is not None and not depcache.MarkedInstall(pkg) \
+ and depcache.IsUpgradable(pkg):
print "Upgrade didn't upgrade (kept): %s" % pkg.Name
@@ -99,7 +100,7 @@ print "DebSize: %s " % apt_pkg.SizeToStr(depcache.DebSize)
# overview about what would happen
for pkg in cache.Packages:
if depcache.MarkedInstall(pkg):
- if pkg.CurrentVer != None:
+ if pkg.CurrentVer is not None:
print "Marked upgrade: %s " % pkg.Name
else:
print "Marked install: %s" % pkg.Name