~james-page/charms/trusty/glance/tox

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/fetch/__init__.py

  • Committer: james.page at ubuntu
  • Date: 2015-06-09 09:53:27 UTC
  • mfrom: (100.1.15 glance)
  • Revision ID: james.page@ubuntu.com-20150609095327-xtzo24fowpygu6fe
Add support for leader-election

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
 
159
159
def apt_cache(in_memory=True):
160
160
    """Build and return an apt cache"""
161
 
    import apt_pkg
 
161
    from apt import apt_pkg
162
162
    apt_pkg.init()
163
163
    if in_memory:
164
164
        apt_pkg.config.set("Dir::Cache::pkgcache", "")