summaryrefslogtreecommitdiff
path: root/modules/ssh
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2016-12-31 03:08:38 +0300
committerArtyom V. Poptsov <poptsov.artyom@gmail.com>2016-12-31 03:08:38 +0300
commit937c92cfd2e77821b6b30738fa72120e2c618037 (patch)
tree661137d8c5784c6f1138facfe1fffb2eecc03de4 /modules/ssh
parenttests/shell.scm: Add to the repository (diff)
downloadguile-ssh-937c92cfd2e77821b6b30738fa72120e2c618037.tar.gz
shell.scm (rexec): Check only for EOF object
* modules/ssh/shell.scm (rexec): Check only for EOF object. (eof-or-null?): Remove.
Diffstat (limited to 'modules/ssh')
-rw-r--r--modules/ssh/shell.scm11
1 files changed, 1 insertions, 10 deletions
diff --git a/modules/ssh/shell.scm b/modules/ssh/shell.scm
index 0adeb5b..6277b60 100644
--- a/modules/ssh/shell.scm
+++ b/modules/ssh/shell.scm
@@ -53,22 +53,13 @@
;;;
-;; TODO: Move to some other file do prevent duplicating of the procedure in
-;; (ssh dist node).
-(define (eof-or-null? str)
- "Return #t if a STR is an EOF object or an empty string, #f otherwise."
- (or (eof-object? str) (string-null? str)))
-
-
-;;;
-
(define (rexec session cmd)
"Execute a command CMD on the remote side. Return two values: list of
output lines returned by CMD and its exit code."
(let* ((channel (open-remote-input-pipe session cmd))
(result (let loop ((line (read-line channel))
(result '()))
- (if (eof-or-null? line)
+ (if (eof-object? line)
(reverse result)
(loop (read-line channel)
(cons line result)))))