aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2018-10-16 14:35:41 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2018-10-16 23:17:36 +0200
commitad0082afe041af1a6e8e8f04415fdcae23e8fc0f (patch)
tree14cc35375b59280709b295e6d0cd56fea6b2e088
parent02d5ed4a2700e8613aaf0642333734b60caff0f7 (diff)
downloadgnu-guix-ad0082afe041af1a6e8e8f04415fdcae23e8fc0f.tar
gnu-guix-ad0082afe041af1a6e8e8f04415fdcae23e8fc0f.tar.gz
import: json: Handle the error case.
* guix/import/json.scm (json-fetch-alist): Handle the error case.
-rw-r--r--guix/import/json.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/guix/import/json.scm b/guix/import/json.scm
index 4f96a513df..81ea5e7b31 100644
--- a/guix/import/json.scm
+++ b/guix/import/json.scm
@@ -47,4 +47,5 @@ the query."
(define (json-fetch-alist url)
"Return an alist representation of the JSON resource URL, or #f if URL
returns 403 or 404."
- (hash-table->alist (json-fetch url)))
+ (and=> (json-fetch url)
+ hash-table->alist))