diff mbox series

[bug#45984,1/5] import: pypi: Return 'values'.

Message ID 20210119154721.11999-1-zimon.toutoune@gmail.com
State New
Headers show
Series [bug#45984,1/5] import: pypi: Return 'values'. | expand

Checks

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

Commit Message

zimoun Jan. 19, 2021, 3:47 p.m. UTC
Fixes partially <https://bugs.gnu.org/44115>.

* guix/import/pypi.scm (pypi->guix-package): Exhaustive 'values' return.
---
 guix/import/pypi.scm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index bf4dc50138..56f4f3f589 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -9,6 +9,7 @@ 
 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
 ;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
+;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -477,12 +478,10 @@  VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
 `package' s-expression corresponding to that package, or #f on failure."
      (let* ((project (pypi-fetch package-name))
             (info    (and project (pypi-project-info project))))
-       (and project
+       (if project
             (guard (c ((missing-source-error? c)
                        (let ((package (missing-source-error-package c)))
-                         (leave (G_ "no source release for pypi package ~a ~a~%")
-                                (project-info-name info)
-                                (project-info-version info)))))
+                         (values #f '()))))
               (make-pypi-sexp (project-info-name info)
                               (project-info-version info)
                               (and=> (latest-source-release project)
@@ -493,7 +492,8 @@  VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
                               (project-info-summary info)
                               (project-info-summary info)
                               (string->license
-                               (project-info-license info)))))))))
+                               (project-info-license info))))
+            (values #f '()))))))
 
 (define (pypi-recursive-import package-name)
   (recursive-import package-name