diff mbox series

[bug#42206] import: pypi: Handle 'null instead of #nil.

Message ID 20200704224145.5828-1-arunisaac@systemreboot.net
State Accepted
Headers show
Series [bug#42206] import: pypi: Handle 'null instead of #nil. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Arun Isaac July 4, 2020, 10:41 p.m. UTC
* guix/import/pypi.scm (non-empty-string-or-false): guile-json now returns
'null instead of #nil for null JSON values. Handle it.
---
 guix/import/pypi.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Mathieu Othacehe July 5, 2020, 7:58 a.m. UTC | #1
Hello Arun,

>      ((? string? str) str)
> -    ((or #nil #f) #f)))
> +    ((or 'null #f) #f)))

This LGTM.

Thanks,

Mathieu
Arun Isaac July 5, 2020, 10:42 a.m. UTC | #2
Pushed to master, thanks!
diff mbox series

Patch

diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index b20c2300f6..a2b5d995ef 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -7,6 +7,7 @@ 
 ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
+;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -63,7 +64,7 @@ 
   (match-lambda
     ("" #f)
     ((? string? str) str)
-    ((or #nil #f) #f)))
+    ((or 'null #f) #f)))
 
 ;; PyPI project.
 (define-json-mapping <pypi-project> make-pypi-project pypi-project?