~charmers/charms/oneiric/mediawiki/trunk

« back to all changes in this revision

Viewing changes to hooks/cache-relation-changed

  • Committer: Clint Byrum
  • Date: 2011-10-10 14:44:59 UTC
  • Revision ID: clint@ubuntu.com-20111010144459-816jlv2z6sdlyaxu
updating mediawiki for recent juju changes (revision, open-port, private-address in relation-get)

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
            stdout=subprocess.PIPE, close_fds=True)
16
16
    settings = json.loads(p.stdout.read().strip())
17
17
    try:
18
 
        if 'host' in settings and 'port' in settings:
19
 
            memcached_ips.append("'%s:%d'" % getaddrinfo(settings['host'],int(settings['port']))[0][4][0:2])
 
18
        if 'private-address' in settings and 'port' in settings:
 
19
            memcached_ips.append("'%s:%d'" % getaddrinfo(settings['private-address'],int(settings['port']))[0][4][0:2])
20
20
    except KeyError:
21
21
        print memcached_unit + " has no settings. ["+str(settings)+"]"
22
22