diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-11-05 18:04:16 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-11-05 18:04:16 +0100 |
commit | 84934f40d13ab7ad6f22703acbc5272954e2e0f8 (patch) | |
tree | 27ea4c0c7e525c2001f5d6d59a4b31ca4a1d331a /guix/scripts/import | |
parent | 467a3c93db5341864bbe76b68c137ba140616b59 (diff) |
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.
Diffstat (limited to 'guix/scripts/import')
-rw-r--r-- | guix/scripts/import/pypi.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/scripts/import/pypi.scm b/guix/scripts/import/pypi.scm index a36065e5cf..1e03843840 100644 --- a/guix/scripts/import/pypi.scm +++ b/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~%")))))) |