~chris-gondolin/charms/trusty/keystone/ldap-fixes

« back to all changes in this revision

Viewing changes to charmhelpers/fetch/__init__.py

  • Committer: Edward Hope-Morley
  • Date: 2016-01-08 14:33:27 UTC
  • mfrom: (196 stable.remote)
  • mto: This revision was merged to the branch mainline in revision 197.
  • Revision ID: edward.hope-morley@canonical.com-20160108143327-czj7dusywrbuqz66
sync /next

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
    'liberty/proposed': 'trusty-proposed/liberty',
99
99
    'trusty-liberty/proposed': 'trusty-proposed/liberty',
100
100
    'trusty-proposed/liberty': 'trusty-proposed/liberty',
 
101
    # Mitaka
 
102
    'mitaka': 'trusty-updates/mitaka',
 
103
    'trusty-mitaka': 'trusty-updates/mitaka',
 
104
    'trusty-mitaka/updates': 'trusty-updates/mitaka',
 
105
    'trusty-updates/mitaka': 'trusty-updates/mitaka',
 
106
    'mitaka/proposed': 'trusty-proposed/mitaka',
 
107
    'trusty-mitaka/proposed': 'trusty-proposed/mitaka',
 
108
    'trusty-proposed/mitaka': 'trusty-proposed/mitaka',
101
109
}
102
110
 
103
111
# The order of this list is very important. Handlers should be listed in from
225
233
 
226
234
def apt_mark(packages, mark, fatal=False):
227
235
    """Flag one or more packages using apt-mark"""
 
236
    log("Marking {} as {}".format(packages, mark))
228
237
    cmd = ['apt-mark', mark]
229
238
    if isinstance(packages, six.string_types):
230
239
        cmd.append(packages)
231
240
    else:
232
241
        cmd.extend(packages)
233
 
    log("Holding {}".format(packages))
234
242
 
235
243
    if fatal:
236
244
        subprocess.check_call(cmd, universal_newlines=True)
411
419
                importlib.import_module(package),
412
420
                classname)
413
421
            plugin_list.append(handler_class())
414
 
        except (ImportError, AttributeError):
 
422
        except NotImplementedError:
415
423
            # Skip missing plugins so that they can be ommitted from
416
424
            # installation if desired
417
425
            log("FetchHandler {} not found, skipping plugin".format(