From 5988dd06053a4ef0c285509ea9f8b54a72ba64ea Mon Sep 17 00:00:00 2001 From: Abhishek Date: Sun, 10 Apr 2016 00:34:00 +0530 Subject: [PATCH 1/4] add help when argument is given --- atomicapp/cli/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/atomicapp/cli/main.py b/atomicapp/cli/main.py index 8f2fca05..9d06e0fa 100644 --- a/atomicapp/cli/main.py +++ b/atomicapp/cli/main.py @@ -38,6 +38,7 @@ PROVIDERS) from atomicapp.nulecule import NuleculeManager from atomicapp.nulecule.exceptions import NuleculeException, DockerException +from atomicapp.plugin import ProviderFailedException from atomicapp.utils import Utils logger = logging.getLogger(LOGGER_DEFAULT) @@ -122,6 +123,9 @@ def cli_func_exec(cli_func, cli_func_args): except NuleculeException as e: logger.error(e) sys.exit(1) + except ProviderFailedException as e: + logger.error(e) + sys.exit(1) except Exception as e: logger.error(e, exc_info=True) sys.exit(1) From 2fd5d148c83610762665f6fba95391a68048a07d Mon Sep 17 00:00:00 2001 From: Abhishek Date: Sun, 10 Apr 2016 01:09:33 +0530 Subject: [PATCH 2/4] add help when argument is given Conflicts: atomicapp/cli/main.py --- atomicapp/cli/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/atomicapp/cli/main.py b/atomicapp/cli/main.py index 9d06e0fa..126af8d9 100644 --- a/atomicapp/cli/main.py +++ b/atomicapp/cli/main.py @@ -375,7 +375,12 @@ def create_parser(self): def run(self): cmdline = sys.argv[1:] # Grab args from cmdline +<<<<<<< HEAD +======= + if len(cmdline) == 0: # Show help if no args are given by the user + cmdline = ['-h'] +>>>>>>> c69cec8... add help when argument is given # Initial setup of logging (to allow for a few early debug statements) Logging.setup_logging(verbose=True, quiet=False) From 6fe15247e7f0ccc66dd5372541d6229f12d16c76 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Sun, 10 Apr 2016 01:10:19 +0530 Subject: [PATCH 3/4] add help when argument is given Conflicts: atomicapp/cli/main.py --- atomicapp/cli/main.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/atomicapp/cli/main.py b/atomicapp/cli/main.py index 126af8d9..5d9b9df7 100644 --- a/atomicapp/cli/main.py +++ b/atomicapp/cli/main.py @@ -376,11 +376,23 @@ def create_parser(self): def run(self): cmdline = sys.argv[1:] # Grab args from cmdline <<<<<<< HEAD +<<<<<<< HEAD +======= +<<<<<<< HEAD +>>>>>>> 22f382a... add help when argument is given ======= if len(cmdline) == 0: # Show help if no args are given by the user cmdline = ['-h'] +<<<<<<< HEAD >>>>>>> c69cec8... add help when argument is given +======= +>>>>>>> 44ef8a9... add help when no argument is given +======= + if len(cmdline) == 0: + cmdline = ["-h"] +>>>>>>> e4e6a42... add help when no argument is given +>>>>>>> 22f382a... add help when argument is given # Initial setup of logging (to allow for a few early debug statements) Logging.setup_logging(verbose=True, quiet=False) From 1e2ad32d9f34cefb87f303e90fc0f299da3e8ec8 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Sun, 10 Apr 2016 01:12:39 +0530 Subject: [PATCH 4/4] add help when no args given --- atomicapp/cli/main.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/atomicapp/cli/main.py b/atomicapp/cli/main.py index 5d9b9df7..43fe8a7f 100644 --- a/atomicapp/cli/main.py +++ b/atomicapp/cli/main.py @@ -375,24 +375,8 @@ def create_parser(self): def run(self): cmdline = sys.argv[1:] # Grab args from cmdline -<<<<<<< HEAD -<<<<<<< HEAD -======= -<<<<<<< HEAD ->>>>>>> 22f382a... add help when argument is given - -======= if len(cmdline) == 0: # Show help if no args are given by the user cmdline = ['-h'] -<<<<<<< HEAD ->>>>>>> c69cec8... add help when argument is given -======= ->>>>>>> 44ef8a9... add help when no argument is given -======= - if len(cmdline) == 0: - cmdline = ["-h"] ->>>>>>> e4e6a42... add help when no argument is given ->>>>>>> 22f382a... add help when argument is given # Initial setup of logging (to allow for a few early debug statements) Logging.setup_logging(verbose=True, quiet=False)