import: pypi: Use 'with-error-handling'.
* guix/scripts/import/pypi.scm (guix-import-pypi): Wrap body in 'with-error-handling'.master
parent
2178692c93
commit
31ca569ca5
|
@ -85,6 +85,7 @@ Import and convert the PyPI package for PACKAGE-NAME.\n"))
|
||||||
(reverse opts))))
|
(reverse opts))))
|
||||||
(match args
|
(match args
|
||||||
((spec)
|
((spec)
|
||||||
|
(with-error-handling
|
||||||
(let ((name version (package-name->name+version spec)))
|
(let ((name version (package-name->name+version spec)))
|
||||||
(if (assoc-ref opts 'recursive)
|
(if (assoc-ref opts 'recursive)
|
||||||
;; Recursive import
|
;; Recursive import
|
||||||
|
@ -99,7 +100,7 @@ Import and convert the PyPI package for PACKAGE-NAME.\n"))
|
||||||
(unless sexp
|
(unless sexp
|
||||||
(leave (G_ "failed to download meta-data for package '~a'~%")
|
(leave (G_ "failed to download meta-data for package '~a'~%")
|
||||||
name))
|
name))
|
||||||
sexp))))
|
sexp)))))
|
||||||
(()
|
(()
|
||||||
(leave (G_ "too few arguments~%")))
|
(leave (G_ "too few arguments~%")))
|
||||||
((many ...)
|
((many ...)
|
||||||
|
|
Reference in New Issue