~mbruzek/charms/trusty/ntp/amulet

« back to all changes in this revision

Viewing changes to hooks/ntp_hooks.py

  • Committer: James Page
  • Date: 2013-08-29 21:07:57 UTC
  • Revision ID: james.page@canonical.com-20130829210757-jaw92fseamfco94y
Tidy source handling

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    source = hookenv.config('source')
34
34
    remote_sources = []
35
35
    if source:
36
 
        sources = source.split(" ")
37
 
        for source in sources:
38
 
            if len(source) > 0:
39
 
                remote_sources.append({'name': source})
 
36
        for s in source.split(" "):
 
37
            if len(s) > 0:
 
38
                remote_sources.append({'name': s})
40
39
    for relid in hookenv.relation_ids('master'):
41
40
        for unit in hookenv.related_units(relid=relid):
42
41
            u_addr = hookenv.relation_get(attribute='private-address',