summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcmd2.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd2.py b/cmd2.py
index 7fde6d14..f7a0d042 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -998,6 +998,8 @@ class Cmd(cmd.Cmd):
self.poutput(safe_prompt, end='')
self.stdout.flush()
line = self.stdin.readline()
+ if len(line) == 0:
+ line = 'eof'
else:
# we are reading from a pipe, read the line to see if there is
# anything there, if so, then decide whether to print the