~ci-train-bot/ubuntu-system-image/system-image-ubuntu-xenial-landing-023

« back to all changes in this revision

Viewing changes to systemimage/keyring.py

  • Committer: Barry Warsaw
  • Date: 2015-05-08 21:41:15 UTC
  • mfrom: (0.3.2)
  • mto: (240.2.1 system-image)
  • mto: This revision was merged to the branch mainline in revision 241.
  • Revision ID: barry@python.org-20150508214115-7x9811br9w04x9ae
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2013-2014 Canonical Ltd.
 
1
# Copyright (C) 2013-2015 Canonical Ltd.
2
2
# Author: Barry Warsaw <barry@ubuntu.com>
3
3
 
4
4
# This program is free software: you can redistribute it and/or modify
30
30
from contextlib import ExitStack
31
31
from datetime import datetime, timezone
32
32
from systemimage.config import config
33
 
from systemimage.download import DBusDownloadManager
 
33
from systemimage.download import get_download_manager
34
34
from systemimage.gpg import Context
35
35
from systemimage.helpers import makedirs, safe_remove
36
36
from urllib.parse import urljoin
86
86
    else:
87
87
        srcurl = urls
88
88
        ascurl = urls + '.asc'
89
 
    tarxz_src = urljoin(config.service.https_base, srcurl)
90
 
    ascxz_src = urljoin(config.service.https_base, ascurl)
 
89
    tarxz_src = urljoin(config.https_base, srcurl)
 
90
    ascxz_src = urljoin(config.https_base, ascurl)
91
91
    # Calculate the local paths to the temporary download files.  The
92
92
    # blacklist goes to the data partition and all the other files go to the
93
93
    # cache partition.
102
102
    safe_remove(ascxz_dst)
103
103
    with ExitStack() as stack:
104
104
        # Let FileNotFoundError percolate up.
105
 
        DBusDownloadManager().get_files([
 
105
        get_download_manager().get_files([
106
106
            (tarxz_src, tarxz_dst),
107
107
            (ascxz_src, ascxz_dst),
108
108
            ])