mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
import: pypi: Gracefully handle non-existent packages.
Fixes <http://bugs.gnu.org/18831>. Reported by Ian Denhardt <ian@zenhack.net>. * guix/import/pypi.scm (url-fetch, json-fetch, pypi-fetch): Augment docstring to mention #f on failure. (pypi->guix-package): Likewise, and actually return #f on failure. * guix/scripts/import/pypi.scm (guix-import-pypi): Call 'leave' when 'pypi->guix-package' returns #f.
This commit is contained in:
parent
63854bcbb1
commit
467a3c93db
2 changed files with 20 additions and 14 deletions
|
@ -80,4 +80,8 @@ Import and convert the PyPI package for PACKAGE-NAME.\n"))
|
|||
(reverse opts))))
|
||||
(match args
|
||||
((package-name)
|
||||
(pypi->guix-package package-name)))))
|
||||
(let ((sexp (pypi->guix-package package-name)))
|
||||
(unless sexp
|
||||
(leave (_ "failed to download meta-data for package '~a'~%")
|
||||
package-name))
|
||||
sexp)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue