~tvansteenburgh/charms/trusty/mediawiki/fix-tests

« back to all changes in this revision

Viewing changes to hooks/cache-relation-changed

  • Committer: Marco Ceppi
  • Date: 2013-08-14 05:16:20 UTC
  • Revision ID: marco@ceppi.net-20130814051620-14z7706e035o1g9q
Santize input from realtion-list

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
memcached_ips = []
12
12
rl = subprocess.Popen("relation-list",stdout=subprocess.PIPE)
13
13
for memcached_unit in rl.stdout:
14
 
    p = subprocess.Popen(["relation-get", "--format", "json", "-", memcached_unit],
 
14
    p = subprocess.Popen(["relation-get", "--format", "json", "-", memcached_unit.strip()],
15
15
            stdout=subprocess.PIPE, close_fds=True)
16
16
    settings = json.loads(p.stdout.read().strip())
17
17
    try: