aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/refstack_client
diff options
context:
space:
mode:
Diffstat (limited to 'functest/opnfv_tests/openstack/refstack_client')
-rw-r--r--[-rwxr-xr-x]functest/opnfv_tests/openstack/refstack_client/refstack_client.py6
-rw-r--r--[-rwxr-xr-x]functest/opnfv_tests/openstack/refstack_client/tempest_conf.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
index c4618894..9edbab5a 100755..100644
--- a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
+++ b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
@@ -218,7 +218,7 @@ class RefstackClientParser(object):
return vars(self.parser.parse_args(argv))
-if __name__ == '__main__':
+def main():
logging.basicConfig()
refstackclient = RefstackClient()
parser = RefstackClientParser()
@@ -226,6 +226,6 @@ if __name__ == '__main__':
try:
result = refstackclient.main(**args)
if result != testcase.TestCase.EX_OK:
- sys.exit(result)
+ return result
except Exception:
- sys.exit(testcase.TestCase.EX_RUN_ERROR)
+ return testcase.TestCase.EX_RUN_ERROR
diff --git a/functest/opnfv_tests/openstack/refstack_client/tempest_conf.py b/functest/opnfv_tests/openstack/refstack_client/tempest_conf.py
index 5d429e7c..30590b9e 100755..100644
--- a/functest/opnfv_tests/openstack/refstack_client/tempest_conf.py
+++ b/functest/opnfv_tests/openstack/refstack_client/tempest_conf.py
@@ -49,7 +49,7 @@ class TempestConf(object):
logger.error('Error with run: %s', e)
-if __name__ == '__main__':
+def main():
logging.basicConfig()
tempestconf = TempestConf()
tempestconf.main()