summaryrefslogtreecommitdiff
path: root/examples/python_scripting.py
diff options
context:
space:
mode:
authorxNinjaKittyx <sangbumahn@gmail.com>2019-06-24 17:54:15 -0700
committerxNinjaKittyx <sangbumahn@gmail.com>2019-06-24 17:54:15 -0700
commite8206628eefe8234cb5118807c6f40e983c2a316 (patch)
tree455fda269bf89e5a6195059083179b8b44d51754 /examples/python_scripting.py
parentbef07746e33da9def33d814913891384a545a95c (diff)
downloadcmd2-git-e8206628eefe8234cb5118807c6f40e983c2a316.tar.gz
Initial Commit for Issue 698
Diffstat (limited to 'examples/python_scripting.py')
-rwxr-xr-xexamples/python_scripting.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/python_scripting.py b/examples/python_scripting.py
index c45648bc..f9461fa5 100755
--- a/examples/python_scripting.py
+++ b/examples/python_scripting.py
@@ -56,7 +56,7 @@ class CmdLineApp(cmd2.Cmd):
"""
# Expect 1 argument, the directory to change to
if not arglist or len(arglist) != 1:
- self.perror("cd requires exactly 1 argument:", traceback_war=False)
+ self.pexcept("cd requires exactly 1 argument:", traceback_war=False)
self.do_help('cd')
self.last_result = cmd2.CommandResult('', 'Bad arguments')
return
@@ -83,7 +83,7 @@ class CmdLineApp(cmd2.Cmd):
data = path
if err:
- self.perror(err, traceback_war=False)
+ self.pexcept(err, traceback_war=False)
self.last_result = cmd2.CommandResult(out, err, data)
# Enable tab completion for cd command
@@ -98,7 +98,7 @@ class CmdLineApp(cmd2.Cmd):
"""List contents of current directory."""
# No arguments for this command
if unknown:
- self.perror("dir does not take any positional arguments:", traceback_war=False)
+ self.pexcept("dir does not take any positional arguments:", traceback_war=False)
self.do_help('dir')
self.last_result = cmd2.CommandResult('', 'Bad arguments')
return