guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/21: installer: Replace an instance of cdr with match.


From: John Darrington
Subject: 02/21: installer: Replace an instance of cdr with match.
Date: Sat, 31 Dec 2016 14:54:17 +0000 (UTC)

jmd pushed a commit to branch wip-installer
in repository guix.

commit d2fcd7c34aa60659a30e2b0f11d7c7a9d77becb1
Author: John Darrington <address@hidden>
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"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]