TerminalSession.st
changeset 3111 9db40cb12c21
parent 3110 2e9ebced59e6
child 3112 48fe32a582b4
--- a/TerminalSession.st	Fri Aug 23 13:07:51 2013 +0200
+++ b/TerminalSession.st	Fri Aug 23 14:02:58 2013 +0200
@@ -440,9 +440,11 @@
         self onPrompt:nil do:nil.
         AbortOperationRequest raise.
     ].
-    output first isEmpty ifTrue:[
-        "/ self halt.
-        output := output copyFrom:2
+    output notEmptyOrNil ifTrue:[
+        output first isEmpty ifTrue:[
+            "/ self halt.
+            output := output copyFrom:2
+        ].
     ].
     ^ output
 !
@@ -455,6 +457,7 @@
     output := self 
                 outputFromAction:[ self sendLine:aCommand ]
                 prompt:prompt timeout:seconds.
+    output isEmptyOrNil ifTrue:[^ output].
 
     "/ the first line of output is the echo
     firstLine := output first withoutLeadingSeparators.
@@ -657,11 +660,11 @@
 !TerminalSession class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/TerminalSession.st,v 1.14 2013-08-23 11:07:51 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/TerminalSession.st,v 1.15 2013-08-23 12:02:58 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic2/TerminalSession.st,v 1.14 2013-08-23 11:07:51 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/TerminalSession.st,v 1.15 2013-08-23 12:02:58 cg Exp $'
 ! !