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.
This commit is contained in:
Ludovic Courtès 2014-11-05 18:04:16 +01:00
parent 467a3c93db
commit 84934f40d1

View file

@ -84,4 +84,8 @@ (define (parse-options)
(unless sexp
(leave (_ "failed to download meta-data for package '~a'~%")
package-name))
sexp)))))
sexp))
(()
(leave (_ "too few arguments~%")))
((many ...)
(leave (_ "too many arguments~%"))))))