jmd pushed a commit to branch wip-installer
in repository guix.
commit d2fcd7c34aa60659a30e2b0f11d7c7a9d77becb1
Author: John Darrington <[email protected]>
Date: Tue Dec 27 07:58:31 2016 +0100
installer: Replace an instance of cdr with match.
* gnu/system/installer/wireless.scm (scan-wifi): Use match instead of cdr.
---
gnu/system/installer/wireless.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gnu/system/installer/wireless.scm
b/gnu/system/installer/wireless.scm
index 3eeb532..5e04acf 100644
--- a/gnu/system/installer/wireless.scm
+++ b/gnu/system/installer/wireless.scm
@@ -174,7 +174,9 @@ network={
"" s))
(define (scan-wifi ifce)
- (cdr (slurp (string-append "iwlist " ifce " scan") string-trim-both)))
+ (match (slurp (string-append "iwlist " ifce " scan") string-trim-both)
+ (#f '())
+ ((_ . lines) lines))) ;; Ignore the first line
(define (drop-prefix pfx s)
"Drop PFX from S if it is the first string"