diff options
Diffstat (limited to 'lorrycontroller/confparser.py')
-rw-r--r-- | lorrycontroller/confparser.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lorrycontroller/confparser.py b/lorrycontroller/confparser.py index e8b78d8..403b768 100644 --- a/lorrycontroller/confparser.py +++ b/lorrycontroller/confparser.py @@ -323,15 +323,11 @@ class LorryControllerConfig(object): query_string = '%s %s' % (command, ' '.join(args)) query_string = urllib.quote(query_string) trovehost = urllib.quote(trove['trovehost']) - url = '%s/gitano-command.cgi?cmd=%s' % (trovehost, query_string) - if trove['protocol'] == 'https': - url = ('https://%s:%s@%s' % (trove['auth']['username'], - trove['auth']['password'], - url)) - else: - url = 'http://%s' % url + url = '%s://%s/gitano-command.cgi?cmd=%s' % ( + trove['protocol'], trovehost, query_string) + auth = trove.get('auth', None) # make an http request to the url - exit, out, err = self.app.maybe_http_request(url, dry=dry) + exit, out, err = self.app.maybe_http_request(url, auth=auth, dry=dry) return exit, out, err def _give_up(self, *args, **kwargs): |