diff options
author | Thomas Kluyver <takowl@gmail.com> | 2015-04-20 14:23:49 -0700 |
---|---|---|
committer | Thomas Kluyver <takowl@gmail.com> | 2015-04-20 14:23:49 -0700 |
commit | fba2c6c4d903c2d1e4eca5fbd0db2336d7656ef0 (patch) | |
tree | 25b73af04aa1850af51b0f41bbb8baaf7405e712 | |
parent | 3ab8c243d791996a310d10da6145012a8985f6b1 (diff) | |
parent | 73aff2be3495b094d6b25e962f4636f83c873f65 (diff) | |
download | pexpect-git-fba2c6c4d903c2d1e4eca5fbd0db2336d7656ef0.tar.gz |
Merge pull request #208 from epadillas/doc-overview-bugs
Escape quote in print() and fix indexes
-rw-r--r-- | doc/overview.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/overview.rst b/doc/overview.rst index a04e389..76fc846 100644 --- a/doc/overview.rst +++ b/doc/overview.rst @@ -84,13 +84,13 @@ The following code fragment gives an example of this:: # We expect any of these three patterns... i = child.expect (['Permission denied', 'Terminal type', '[#\$] ']) if i==0: - print('Permission denied on host. Can't login') + print('Permission denied on host. Can\'t login') child.kill(0) - elif i==2: + elif i==1: print('Login OK... need to send terminal type.') child.sendline('vt100') child.expect('[#\$] ') - elif i==3: + elif i==2: print('Login OK.') print('Shell command prompt', child.after) |