Fix bug in capture.
authorEric S. Raymond <esr@thyrsus.com>
Sat, 25 Feb 2017 11:06:14 +0000 (06:06 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Sat, 25 Feb 2017 11:06:14 +0000 (06:06 -0500)
sst.py

diff --git a/sst.py b/sst.py
index 2cc711bff8a37f570eec3fcefec01e5605ff8a2e..cef7b8f13b4a9e2c2e3f63dd71f2806ee125c2fa 100755 (executable)
--- a/sst.py
+++ b/sst.py
@@ -2148,7 +2148,7 @@ def capture():
         return
 
        # big surprise, he refuses to surrender */
-       prout(_("Fat chance, captain!"))
+    prout(_("Fat chance, captain!"))
 
 # Code from events.c begins here.
 
@@ -3483,7 +3483,11 @@ def cgetline():
                 elif linein[0] != "#":
                     break
         else:
-            linein = my_input() + "\n"
+            try:
+                linein = my_input() + "\n"
+            except EOFError:
+                prout("")
+                sys.exit(0)
     if logfp:
         logfp.write(linein)
     return linein