~saviq/charms/trusty/openstack-dashboard/simplify-settings

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/core/host.py

  • Committer: Michał Sawicz
  • Date: 2015-06-02 12:12:49 UTC
  • Revision ID: michal.sawicz@canonical.com-20150602121249-gbayin5yj3eep5hk
Sync charm helpers' pattern support in OSConfigRenderer

Show diffs side-by-side

added added

removed removed

Lines of Context:
275
275
    Generate a hash checksum of all files matching 'path'. Standard wildcards
276
276
    like '*' and '?' are supported, see documentation for the 'glob' module for
277
277
    more information.
278
 
        
 
278
 
279
279
    :return: dict: A { filename: hash } dictionary for all matched files.
280
280
                   Empty if none found.
281
281
    """
282
282
    return {
283
283
        filename: file_hash(filename)
284
 
            for filename in glob.iglob(path)
 
284
        for filename in glob.iglob(path)
285
285
    }
286
286
 
287
287
 
326
326
    """
327
327
    def wrap(f):
328
328
        def wrapped_f(*args, **kwargs):
329
 
            checksums = { path: path_hash(path) for path in restart_map }
 
329
            checksums = {path: path_hash(path) for path in restart_map}
330
330
            f(*args, **kwargs)
331
331
            restarts = []
332
332
            for path in restart_map: