summaryrefslogtreecommitdiff
path: root/examples/scripts/conditional.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-05-27 17:40:52 -0400
committerGitHub <noreply@github.com>2018-05-27 17:40:52 -0400
commit8f88f819fae7508066a81a8d961a7115f2ec4bed (patch)
treedb21d73cba1b851e7e95429018b1e79cf5476efe /examples/scripts/conditional.py
parent6b6a36c41bd4d1ce3c7b8fbe46d935e599ccf744 (diff)
parent906feb79ba54fde2b0635c321c659922559779f3 (diff)
downloadcmd2-git-8f88f819fae7508066a81a8d961a7115f2ec4bed.tar.gz
Merge pull request #419 from python-cmd2/py_updates
Removed unused function
Diffstat (limited to 'examples/scripts/conditional.py')
-rw-r--r--examples/scripts/conditional.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/scripts/conditional.py b/examples/scripts/conditional.py
index 1eeeadba..87cd10ac 100644
--- a/examples/scripts/conditional.py
+++ b/examples/scripts/conditional.py
@@ -24,16 +24,16 @@ else:
original_dir = os.getcwd()
# Try to change to the specified directory
-cmd('cd {}'.format(directory))
+app('cd {}'.format(directory))
# Conditionally do something based on the results of the last command
if self._last_result:
print('\nContents of directory {!r}:'.format(directory))
- cmd('dir -l')
+ app('dir -l')
# Change back to where we were
print('Changing back to original directory: {!r}'.format(original_dir))
- cmd('cd {}'.format(original_dir))
+ app('cd {}'.format(original_dir))
else:
# cd command failed, print a warning
print('Failed to change directory to {!r}'.format(directory))