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

Proposed by Michael Vogt on 2012-03-27
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) 2012-03-27 Approve on 2012-03-27
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.
Julian Andres Klode (juliank) wrote :

That seems fine.

review: Approve
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
=== modified file 'apt/package.py'
--- apt/package.py 2012-01-30 14:46:34 +0000
+++ apt/package.py 2012-03-27 09:29:17 +0000
@@ -545,7 +545,10 @@
545545
546 .. versionadded:: 0.7.10546 .. versionadded:: 0.7.10
547 """547 """
548 return iter(self._uris()).next()548 try:
549 return iter(self._uris()).next()
550 except StopIteration:
551 return None
549552
550 def fetch_binary(self, destdir='', progress=None):553 def fetch_binary(self, destdir='', progress=None):
551 """Fetch the binary version of the package.554 """Fetch the binary version of the package.
552555
=== modified file 'debian/changelog'
--- debian/changelog 2012-03-05 12:05:39 +0000
+++ debian/changelog 2012-03-27 09:29:17 +0000
@@ -14,6 +14,8 @@
14 * python/tag.cc, tests/test_tagfile.py:14 * python/tag.cc, tests/test_tagfile.py:
15 - add support a filename argument in apt_pkg.TagFile() (in addition15 - add support a filename argument in apt_pkg.TagFile() (in addition
16 to the file object currently supported)16 to the file object currently supported)
17 * apt/package.py:
18 - if there is no Version.uri return None
1719
18 [Julian Andres Klode ]20 [Julian Andres Klode ]
19 * python/apt_pkgmodule.cc:21 * python/apt_pkgmodule.cc:

Subscribers

People subscribed via source and target branches

to all changes: