summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-03-27 11:21:20 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-03-27 11:21:20 +0200
commitda171aa93337802c19d8caa99a4ab8516bdbc5bd (patch)
treec26ab2426749f060d760ad70d7300ed47f587e95 /apt
parent3514672ed2a333eb6791d425ebe59b883cf8d349 (diff)
downloadpython-apt-da171aa93337802c19d8caa99a4ab8516bdbc5bd.tar.gz
* apt/package.py:
- if there is no Version.uri return None
Diffstat (limited to 'apt')
-rw-r--r--apt/package.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/apt/package.py b/apt/package.py
index 73f68c87..29eec909 100644
--- a/apt/package.py
+++ b/apt/package.py
@@ -545,7 +545,10 @@ class Version(object):
.. versionadded:: 0.7.10
"""
- return iter(self._uris()).next()
+ try:
+ return iter(self._uris()).next()
+ except StopIteration:
+ return None
def fetch_binary(self, destdir='', progress=None):
"""Fetch the binary version of the package.