You can easily test this by adding a syntax error to e.g. the do_load_fabric function:
def do_load_fabric(self, args=""):
"load csv file and generate an internal representation of the fabric"
args = self.parse(args)
asdf
....
The FABulous shell does not indicate that an error has occurred:
FABulous> load_fabric
FABulous>
This PR fixes that:
FABulous> load_fabric
Traceback (most recent call last):
File "/home/leo/Projects/FABulous_fix/FABulous.py", line 276, in onecmd
return super().onecmd(line)
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/cmd.py", line 217, in onecmd
return func(arg)
^^^^^^^^^
File "/home/leo/Projects/FABulous_fix/FABulous.py", line 318, in do_load_fabric
asdf
NameError: name 'asdf' is not defined
FABulous>
If an error/exception occurs inside the FABulous Shell it is not printed, only
False
is returned:You can easily test this by adding a syntax error to e.g. the
do_load_fabric
function:The FABulous shell does not indicate that an error has occurred:
This PR fixes that: