From b7fd8f7f7a634d1b0298a7b0200347330b75c4eb Mon Sep 17 00:00:00 2001 From: Thomas Duval Date: Wed, 7 Sep 2016 14:09:19 +0200 Subject: Update subprocess code to be compliant with Python2 and update credentials for Swift Moonclient test. Change-Id: I571f3c48765da02ed7ad6c23b006afe0f97a8636 (cherry picked from commit 705b9d51a9d81ca75b07f71c09d9a4e9f35ed49a) --- moonclient/moonclient/shell.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'moonclient/moonclient/shell.py') diff --git a/moonclient/moonclient/shell.py b/moonclient/moonclient/shell.py index d1d02518..8be73621 100644 --- a/moonclient/moonclient/shell.py +++ b/moonclient/moonclient/shell.py @@ -135,9 +135,12 @@ class MoonClient(App): def nb_error(self): return self._nb_error - def incr_error(self): + def incr_error(self, msg=""): self._nb_error += 1 - print("INCREMENTING ERRORS {}".format(self._nb_error)) + if not msg: + print("INCREMENTING ERRORS {}".format(self._nb_error)) + else: + print("INCREMENTING ERRORS {} [{}]".format(self._nb_error, msg)) def get_tenant_uuid(self, tenant_name): return self.get_url("/v3/projects?name={}".format(tenant_name), authtoken=True, port=5000)["projects"][0]["id"] -- cgit 1.2.3-korg