me
/
guix
Archived
1
0
Fork 0

import: pypi: Use 'with-error-handling'.

* guix/scripts/import/pypi.scm (guix-import-pypi): Wrap body in
'with-error-handling'.
master
Ludovic Courtès 2022-02-02 15:53:55 +01:00
parent 2178692c93
commit 31ca569ca5
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 19 additions and 18 deletions

View File

@ -85,6 +85,7 @@ Import and convert the PyPI package for PACKAGE-NAME.\n"))
(reverse opts))))
(match args
((spec)
(with-error-handling
(let ((name version (package-name->name+version spec)))
(if (assoc-ref opts 'recursive)
;; Recursive import
@ -99,7 +100,7 @@ Import and convert the PyPI package for PACKAGE-NAME.\n"))
(unless sexp
(leave (G_ "failed to download meta-data for package '~a'~%")
name))
sexp))))
sexp)))))
(()
(leave (G_ "too few arguments~%")))
((many ...)