Browse Source

import: pypi: Gracefully handle wrong argument counts.

* guix/scripts/import/pypi.scm (guix-import-pypi): Use 'leave' to handle
  cases where ARGS has zero or two or more elements.
version-0.8.3
Ludovic Courtès 7 years ago
parent
commit
84934f40d1
  1. 6
      guix/scripts/import/pypi.scm

6
guix/scripts/import/pypi.scm

@ -84,4 +84,8 @@ Import and convert the PyPI package for PACKAGE-NAME.\n"))
(unless sexp
(leave (_ "failed to download meta-data for package '~a'~%")
package-name))
sexp)))))
sexp))
(()
(leave (_ "too few arguments~%")))
((many ...)
(leave (_ "too many arguments~%"))))))
Loading…
Cancel
Save