Merge lp:~mvo/python-apt/mvo into lp:~mvo/python-apt/debian-sid-mirrored

Proposed by Michael Vogt
Status: Merged
Merged at revision: 579
Proposed branch: lp:~mvo/python-apt/mvo
Merge into: lp:~mvo/python-apt/debian-sid-mirrored
Diff against target: 28 lines (+6/-1)
2 files modified
apt/package.py (+4/-1)
debian/changelog (+2/-0)
To merge this branch: bzr merge lp:~mvo/python-apt/mvo
Reviewer Review Type Date Requested Status
Julian Andres Klode (community) Approve
Review via email: mp+99483@code.launchpad.net

Description of the change

This will make the Version.uri method return None if there is no uri for this version instead of a StopIteration exception. This seems conceptually cleaner.

To post a comment you must log in.
Revision history for this message
Julian Andres Klode (juliank) wrote :

That seems fine.

review: Approve
Revision history for this message
Michael Vogt (mvo) wrote :

On Tue, Mar 27, 2012 at 09:30:36AM -0000, Julian Andres Klode wrote:
> Review: Approve
>
> That seems fine.

Great, thanks a bunch.

Cheers,
 Michael

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'apt/package.py'
2--- apt/package.py 2012-01-30 14:46:34 +0000
3+++ apt/package.py 2012-03-27 09:29:17 +0000
4@@ -545,7 +545,10 @@
5
6 .. versionadded:: 0.7.10
7 """
8- return iter(self._uris()).next()
9+ try:
10+ return iter(self._uris()).next()
11+ except StopIteration:
12+ return None
13
14 def fetch_binary(self, destdir='', progress=None):
15 """Fetch the binary version of the package.
16
17=== modified file 'debian/changelog'
18--- debian/changelog 2012-03-05 12:05:39 +0000
19+++ debian/changelog 2012-03-27 09:29:17 +0000
20@@ -14,6 +14,8 @@
21 * python/tag.cc, tests/test_tagfile.py:
22 - add support a filename argument in apt_pkg.TagFile() (in addition
23 to the file object currently supported)
24+ * apt/package.py:
25+ - if there is no Version.uri return None
26
27 [Julian Andres Klode ]
28 * python/apt_pkgmodule.cc:

Subscribers

People subscribed via source and target branches

to all changes: