~ruther/guix-local

84934f40d13ab7ad6f22703acbc5272954e2e0f8 — Ludovic Courtès 11 years ago 467a3c9
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.
1 files changed, 5 insertions(+), 1 deletions(-)

M guix/scripts/import/pypi.scm
M guix/scripts/import/pypi.scm => guix/scripts/import/pypi.scm +5 -1
@@ 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~%"))))))