import/print: package->code: Fix branching.

* guix/import/print.scm (package->code)<license->code>: Branch on VAR, not on
the SYMBOL-APPEND return value.
This commit is contained in:
Ricardo Wurmus 2020-12-27 12:04:22 +01:00
parent 63ebc380a8
commit 649786f0cb
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -57,7 +57,8 @@ (define (variable-name val mod)
;; Print either license variable name or the code for a license object
(define (license->code lic)
(let ((var (variable-name lic '(guix licenses))))
(or (symbol-append 'license: var)
(if var
(symbol-append 'license: var)
`(license
(name ,(license-name lic))
(uri ,(license-uri lic))