Merge lp://staging/~gz/bzr-builddeb/trivial_apt_pkg_compat_tweak into lp://staging/bzr-builddeb

Proposed by Martin Packman
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 636
Merged at revision: 636
Proposed branch: lp://staging/~gz/bzr-builddeb/trivial_apt_pkg_compat_tweak
Merge into: lp://staging/bzr-builddeb
Diff against target: 15 lines (+2/-2)
1 file modified
directory.py (+2/-2)
To merge this branch: bzr merge lp://staging/~gz/bzr-builddeb/trivial_apt_pkg_compat_tweak
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+80032@code.staging.launchpad.net

Description of the change

Just tweak the way fallback is done for older apt_pkg versions so a deprecation warning is not triggered by accessing the old (capitalised) names unless the new (lowercase) ones do not exist.

Without this, using `bzr info apt:...` (which is really neat by the way) on squeeze gets me:

.../bzrlib/plugins/builddeb/directory.py:47: DeprecationWarning: Attribute 'Lookup'
of the 'apt_pkg.SourceRecords' object is deprecated, use 'lookup' instead.
  lookup = getattr(sources, 'lookup', getattr(sources, 'Lookup', None))
.../bzrlib/plugins/builddeb/directory.py:49: DeprecationWarning: Attribute 'Record'
of the 'apt_pkg.SourceRecords' object is deprecated, use 'record' instead.
  record = getattr(sources, 'record', getattr(sources, 'Record', None))
Retrieving Vcs locating from python-debian Debian version 0.1.18

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches