summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-05-23 17:22:02 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-05-23 17:22:02 +0200
commitc20f05632a6c49432496b404176b3bce76adc591 (patch)
treea3469b57aa865e3b91f6b715bd146b8d3bdcdd3a
parent9b0e8c615b96bcf7b6a98b8df5a8bb1bf64dd2dc (diff)
downloadpython-apt-c20f05632a6c49432496b404176b3bce76adc591.tar.gz
* UpdateManager/UpdateManager.py:
- guard against failures from "installVersion"
-rw-r--r--UpdateManager/UpdateManager.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py
index 134c6d32..5b8be99a 100644
--- a/UpdateManager/UpdateManager.py
+++ b/UpdateManager/UpdateManager.py
@@ -160,9 +160,9 @@ class MyCache(apt.Cache):
# approach here and just strip it away, but I'm
# sure that this can lead to problems
installed = pkg.installedVersion
- if ":" in installed:
+ if installed and ":" in installed:
installed = installed.split(":",1)[1]
- if apt_pkg.VersionCompare(match.group(1),installed) <= 0:
+ if installed and apt_pkg.VersionCompare(match.group(1),installed) <= 0:
break
# EOF (shouldn't really happen)
alllines = alllines + line