Merge lp:~jelmer/bzr-builddeb/fix-attribute into lp:bzr-builddeb

Proposed by Jelmer Vernooij
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jelmer/bzr-builddeb/fix-attribute
Merge into: lp:bzr-builddeb
Diff against target: 18 lines (+7/-1)
1 file modified
directory.py (+7/-1)
To merge this branch: bzr merge lp:~jelmer/bzr-builddeb/fix-attribute
Reviewer Review Type Date Requested Status
Bzr-builddeb-hackers Pending
Review via email: mp+19724@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

fix my deprecation warning fix so bzr-builddeb still works with older versions of apt_pkg.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'directory.py'
2--- directory.py 2010-02-10 21:24:23 +0000
3+++ directory.py 2010-02-19 16:22:14 +0000
4@@ -35,7 +35,13 @@
5
6 apt_pkg.init()
7
8- sources = apt_pkg.SourceRecords()
9+ # Older versions of apt_pkg don't have SourceRecords,
10+ # newer versions give a deprecation warning when using
11+ # GetPkgSrcRecords.
12+ try:
13+ sources = apt_pkg.SourceRecords()
14+ except AttributeError:
15+ sources = apt_pkg.GetPkgSrcRecords()
16
17 urls = {}
18 while sources.Lookup(name):

Subscribers

People subscribed via source and target branches