~ubuntu-langpack/langpack-o-matic/main

« back to all changes in this revision

Viewing changes to lib/static_translations.py

  • Committer: Martin Pitt
  • Date: 2016-09-13 09:43:14 UTC
  • Revision ID: martin.pitt@canonical.com-20160913094314-4pax37wvffoqr93j
Eliminate launchpad.credentials

Retrieving the raw translation tarballs works anonymously these days.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
 
42
42
def get_static_translation_tarballs(distro, from_release, to_release):
43
 
    '''Get URLs of current static translation tarballs for a release interval.
 
43
    '''Get URLs of current static translation tarballs for a release interval'''
44
44
 
45
 
    This uses launchpadlib and expects the credentials in
46
 
    ./launchpad.credentials .
47
 
    '''
48
45
    # get launchpadlib object
49
 
    lp = Launchpad.login_with('langpack-o-matic', service_root='production',
50
 
                              credentials_file='launchpad.credentials')
 
46
    lp = Launchpad.login_anonymously('langpack-o-matic', service_root='production')
51
47
    lpdistro = lp.distributions[distro]
52
48
    distrorelease = lpdistro.getSeries(name_or_version=to_release.split('-')[0])
53
49