diff --git a/coconut/command/command.py b/coconut/command/command.py index b35a9e3f6..64f426d16 100644 --- a/coconut/command/command.py +++ b/coconut/command/command.py @@ -174,6 +174,7 @@ def start(self, run=False): def cmd(self, args=None, argv=None, interact=True, default_target=None, use_dest=None): """Process command-line arguments.""" + result = None with self.handling_exceptions(): if args is None: parsed_args = arguments.parse_args() @@ -396,7 +397,8 @@ def execute_args(self, args, interact=True, original_args=None): if args.profile: print_timing_info() - return filepaths + # make sure to return inside handling_exceptions to ensure filepaths is available + return filepaths def process_source_dest(self, source, dest, args): """Determine the correct source, dest, package mode to use for the given source, dest, and args.""" diff --git a/coconut/root.py b/coconut/root.py index 3b83f03eb..b6b8cff64 100644 --- a/coconut/root.py +++ b/coconut/root.py @@ -26,7 +26,7 @@ VERSION = "3.0.2" VERSION_NAME = None # False for release, int >= 1 for develop -DEVELOP = 22 +DEVELOP = 23 ALPHA = False # for pre releases rather than post releases assert DEVELOP is False or DEVELOP >= 1, "DEVELOP must be False or an int >= 1" diff --git a/coconut/tests/main_test.py b/coconut/tests/main_test.py index a9825a2ff..857aaf581 100644 --- a/coconut/tests/main_test.py +++ b/coconut/tests/main_test.py @@ -710,6 +710,9 @@ def comp_runnable(args=[]): @add_test_func_names class TestShell(unittest.TestCase): + def test_version(self): + call(["coconut", "--version"]) + def test_code(self): call(["coconut", "-s", "-c", coconut_snip], assert_output=True)