Skip to content

Commit 04f2dd9

Browse files
committed
Fix self.last_resort typo
1 parent 76c5b67 commit 04f2dd9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmd2/cmd2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4502,7 +4502,7 @@ def do_py(self, _: argparse.Namespace) -> Optional[bool]:
45024502
45034503
:return: True if running of commands should stop.
45044504
"""
4505-
# self.last_resort will be set by _run_python()
4505+
# self.last_result will be set by _run_python()
45064506
return self._run_python()
45074507

45084508
run_pyscript_parser = argparse_custom.DEFAULT_ARGUMENT_PARSER(description="Run a Python script file inside the console")
@@ -4537,7 +4537,7 @@ def do_run_pyscript(self, args: argparse.Namespace) -> Optional[bool]:
45374537
# Overwrite sys.argv to allow the script to take command line arguments
45384538
sys.argv = [args.script_path, *args.script_arguments]
45394539

4540-
# self.last_resort will be set by _run_python()
4540+
# self.last_result will be set by _run_python()
45414541
py_return = self._run_python(pyscript=args.script_path)
45424542
finally:
45434543
# Restore command line arguments to original state
@@ -4730,7 +4730,7 @@ def do_history(self, args: argparse.Namespace) -> Optional[bool]:
47304730
try:
47314731
self.run_editor(fname)
47324732

4733-
# self.last_resort will be set by do_run_script()
4733+
# self.last_result will be set by do_run_script()
47344734
return self.do_run_script(utils.quote_string(fname))
47354735
finally:
47364736
os.remove(fname)
@@ -5093,7 +5093,7 @@ def do_run_script(self, args: argparse.Namespace) -> Optional[bool]:
50935093
self._script_dir.append(os.path.dirname(expanded_path))
50945094

50955095
if args.transcript:
5096-
# self.last_resort will be set by _generate_transcript()
5096+
# self.last_result will be set by _generate_transcript()
50975097
self._generate_transcript(
50985098
script_commands,
50995099
os.path.expanduser(args.transcript),

0 commit comments

Comments
 (0)