~gmb/+junk/lp-bug-upstreamer

« back to all changes in this revision

Viewing changes to upstream-packagebugs.py

  • Committer: Graham Binns
  • Date: 2009-02-13 15:57:23 UTC
  • Revision ID: graham@canonical.com-20090213155723-vz55uq1b6kmtink3
It's now possible to specify which API root you use. The default is http://api.edge.launchpad.net/beta/

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
DEFAULT_SEARCH_STATUS = 'Triaged'
27
27
 
28
 
SERVICE_ROOT = STAGING_SERVICE_ROOT
 
28
SERVICE_ROOT = EDGE_SERVICE_ROOT
29
29
 
30
30
OPTIONS = [
31
31
    make_option(
47
47
              "specific data, such as credentials and caches. This "
48
48
              "defaults to ~/.launchpadlib."),
49
49
         default=os.path.join(os.environ['HOME'], '.launchpadlib')),
 
50
    make_option(
 
51
        '--api-service-root', dest='service_root', action='store',
 
52
        help="Specify the Launchpad API root to use",
 
53
        default=SERVICE_ROOT)
50
54
    ]
51
55
 
52
56
class PackageUpstreamer:
139
143
        else:
140
144
            # Otherwise get a token and then save the credentials.
141
145
            launchpad = Launchpad.get_token_and_login(
142
 
                'Package bug upstreamer', SERVICE_ROOT,
 
146
                'Package bug upstreamer', self.options.service_root,
143
147
                cache=self.cache_dir)
144
148
            launchpad.credentials.save(open(credentials_path, 'w'))
145
149
            return launchpad