From 652122f3c9907a652a9c3a14581bb2aef90bc996 Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Sun, 23 Jun 2019 20:49:27 -0400 Subject: Made last_result public and restored the initialization of it in __init__ and associated comment --- examples/scripts/conditional.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/scripts/conditional.py') diff --git a/examples/scripts/conditional.py b/examples/scripts/conditional.py index 724bb3ee..2e307cb4 100644 --- a/examples/scripts/conditional.py +++ b/examples/scripts/conditional.py @@ -27,10 +27,10 @@ original_dir = os.getcwd() app('cd {}'.format(directory)) # Conditionally do something based on the results of the last command -if self._last_result: +if self.last_result: print('\nContents of directory {!r}:'.format(directory)) app('dir -l') - print('{}\n'.format(self._last_result.data)) + print('{}\n'.format(self.last_result.data)) # Change back to where we were print('Changing back to original directory: {!r}'.format(original_dir)) -- cgit v1.2.1