diff options
author | Christopher Baines <mail@cbaines.net> | 2020-10-02 20:11:07 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-10-02 20:15:23 +0100 |
commit | 71afa939816a3f7d53cce91d00fc1110125f18fe (patch) | |
tree | 2fff9cb4ee66bb91960942e4d6292f772fb8bc64 /guix-data-service | |
parent | 841f5fb18697a545f083e48e2b1e3ab47e4312e4 (diff) | |
download | data-service-71afa939816a3f7d53cce91d00fc1110125f18fe.tar data-service-71afa939816a3f7d53cce91d00fc1110125f18fe.tar.gz |
Make with-postgresql-connection work with multiple values
Diffstat (limited to 'guix-data-service')
-rw-r--r-- | guix-data-service/database.scm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/guix-data-service/database.scm b/guix-data-service/database.scm index 60115ad..2ac26c4 100644 --- a/guix-data-service/database.scm +++ b/guix-data-service/database.scm @@ -65,9 +65,12 @@ (with-throw-handler #t (lambda () - (let ((result (f conn))) - (pg-conn-finish conn) - result)) + (call-with-values + (lambda () + (f conn)) + (lambda vals + (pg-conn-finish conn) + (apply values vals)))) (lambda (key . args) (pg-conn-finish conn))))) |