~arand/hydrazine/lp-ppa-cross-series-copy

« back to all changes in this revision

Viewing changes to bugclient

  • Committer: Max Bowsher
  • Author(s): mbp at sourcefrog
  • Date: 2011-04-09 07:12:38 UTC
  • mfrom: (84.1.4 trunk)
  • Revision ID: maxb@f2s.com-20110409071238-x3s4staau0gjz1ko
Switch to Launchpad.login_with for compatibility with 1.9.x in natty. Also use
recent web_link property in favour of string fiddling.

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
        """Open the current bug in a web browser"""
126
126
        if self._needs_bug():
127
127
            return
128
 
        webbrowser.open(web_url(self.bug))
 
128
        webbrowser.open(self.bug.web_link)
129
129
 
130
130
    def do_pillar(self, pillar_name):
131
131
        """Select a pillar (project, etc)"""
394
394
        print
395
395
 
396
396
 
397
 
def web_url(launchpad_object):
398
 
    """Translate from an object's api url to the web page url"""
399
 
    # very dodgy; see https://bugs.launchpad.net/launchpadlib/+bug/316694
400
 
    return launchpad_object.self_link.replace('api.', '', 1).replace('/beta/', '/', 1)
401
 
 
402
 
 
403
397
def main(argv):
404
398
    parser = optparse.OptionParser()
405
399
    parser.add_option('--staging', action='store_const',