From 073ca3991c00572ac62b3d614d5485a0940c0a7a Mon Sep 17 00:00:00 2001 From: Juti Noppornpitak Date: Thu, 5 May 2016 20:03:58 -0400 Subject: [PATCH] Fixed bugs. --- gallium/console.py | 7 ++----- setup.py | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/gallium/console.py b/gallium/console.py index 68c0631..817f870 100644 --- a/gallium/console.py +++ b/gallium/console.py @@ -80,12 +80,9 @@ def activate(self): sys.exit(15) # Parse arguments and execute. - try: - args = main_parser.parse_known_args() - except Exception as e: - print(type(e)) + args, unknown_args = main_parser.parse_known_args() - if not hasattr(args, 'func'): + if not hasattr(args, 'func') or unknown_args: if len(sys.argv) > 1 and sys.argv[1] in self.commands: self.commands[sys.argv[1]]['parser'].print_help() else: diff --git a/setup.py b/setup.py index f60c0ee..03f6530 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ import os import sys -version = '0.6.6' +version = '0.7.0' primary_cmd = 'bin/gallium' shortcut_cmd = 'bin/g{version}'.format(version = sys.version_info.major) install_cmds = [primary_cmd]