From bcd1d7ccfc07ccd284d30ba5f858efef9d650369 Mon Sep 17 00:00:00 2001 From: diefans Date: Tue, 29 Jan 2013 13:53:36 +0100 Subject: [PATCH 1/2] proper bin path now called --- supervisorctl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supervisorctl b/supervisorctl index 0882a3a3dde..9e188cd454c 100644 --- a/supervisorctl +++ b/supervisorctl @@ -58,7 +58,7 @@ def main(): SUPERVISORCTL = module.get_bin_path('supervisorctl', True) - rc, out, err = module.run_command('%s status' % supervisorctl) + rc, out, err = module.run_command('%s status' % SUPERVISORCTL) present = name in out if state == 'present': @@ -73,7 +73,7 @@ def main(): module.exit_json(changed=False, name=name, state=state) - rc, out, err = module.run_command('%s status %s' % (supervisorctl, name)) + rc, out, err = module.run_command('%s status %s' % (SUPERVISORCTL, name)) running = 'RUNNING' in out if running and state == 'started': From 46d0ba335cf3e0cd0cddd08c9bf738ef4c015942 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Tue, 29 Jan 2013 18:57:02 +0100 Subject: [PATCH 2/2] Fix get_url to work on Python 2.4 --- get_url | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/get_url b/get_url index 2db31c6d7c8..a28656291ef 100644 --- a/get_url +++ b/get_url @@ -101,11 +101,13 @@ def url_do_get(module, url, dest): info = dict(url=url, dest=dest) r = None parsed = urlparse.urlparse(url) - if '@' in parsed.netloc: - credentials = parsed.netloc.split('@')[0] + if '@' in parsed[1]: + credentials, netloc = parsed[1].split('@', 1) if ':' in credentials: - username, password = credentials.split(':') - netloc = parsed.netloc.split('@')[1] + username, password = credentials.split(':', 1) + else: + username = credentials + password = '' parsed = list(parsed) parsed[1] = netloc