/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/launchpad/lp_api.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-11-16 18:59:44 UTC
  • mfrom: (7143.15.15 more-cleanups)
  • Revision ID: breezy.the.bot@gmail.com-20181116185944-biefv1sub37qfybm
Sprinkle some PEP8iness.

Merged from https://code.launchpad.net/~jelmer/brz/more-cleanups/+merge/358611

Show diffs side-by-side

added added

removed removed

Lines of Context:
243
243
        lp_branch = launchpad.branches.getByUrl(url=url)
244
244
        if lp_branch is None:
245
245
            raise errors.BzrError(gettext('%s is not registered on Launchpad') %
246
 
                                                                            url)
 
246
                                  url)
247
247
        return lp_branch
248
248
 
249
249
    def get_target(self):
253
253
            dev_focus = lp_branch.project.development_focus
254
254
            if dev_focus is None:
255
255
                raise errors.BzrError(gettext('%s has no development focus.') %
256
 
                                  lp_branch.bzr_identity)
 
256
                                      lp_branch.bzr_identity)
257
257
            target = dev_focus.branch
258
258
            if target is None:
259
259
                raise errors.BzrError(gettext(
260
 
                        'development focus %s has no branch.') % dev_focus)
 
260
                    'development focus %s has no branch.') % dev_focus)
261
261
        elif lp_branch.sourcepackage is not None:
262
262
            target = lp_branch.sourcepackage.getBranch(pocket="Release")
263
263
            if target is None:
266
266
                                      lp_branch.sourcepackage)
267
267
        else:
268
268
            raise errors.BzrError(gettext(
269
 
                        '%s has no associated product or source package.') %
270
 
                                  lp_branch.bzr_identity)
 
269
                '%s has no associated product or source package.') %
 
270
                lp_branch.bzr_identity)
271
271
        return LaunchpadBranch(target, target.bzr_identity)
272
272
 
273
273
    def update_lp(self):