summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/graph.scm9
-rw-r--r--guix/scripts/offload.scm10
2 files changed, 9 insertions, 10 deletions
diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm
index 489931d5bb..73d9269de2 100644
--- a/guix/scripts/graph.scm
+++ b/guix/scripts/graph.scm
@@ -32,7 +32,8 @@
#:use-module ((guix build-system gnu) #:select (standard-packages))
#:use-module (gnu packages)
#:use-module (guix sets)
- #:use-module ((guix utils) #:select (location-file))
+ #:use-module ((guix diagnostics)
+ #:select (location-file formatted-message))
#:use-module ((guix scripts build)
#:select (show-transformation-options-help
options->transformation
@@ -90,10 +91,8 @@ name."
package)
(x
(raise
- (condition
- (&message
- (message (format #f (G_ "~a: invalid argument (package name expected)")
- x))))))))
+ (formatted-message (G_ "~a: invalid argument (package name expected)")
+ x)))))
(define nodes-from-package
;; The default conversion method.
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index e81b6c25f2..77ff3d2694 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
@@ -33,11 +33,12 @@
#:use-module ((guix serialization)
#:select (nar-error? nar-error-file))
#:use-module (guix nar)
- #:use-module (guix utils)
+ #:use-module ((guix utils) #:select (%current-system))
#:use-module ((guix build syscalls)
#:select (fcntl-flock set-thread-name))
#:use-module ((guix build utils) #:select (which mkdir-p))
#:use-module (guix ui)
+ #:use-module (guix diagnostics)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-26)
@@ -156,10 +157,9 @@ can interpret meaningfully."
(lambda ()
(private-key-from-file file))
(lambda (key proc str . rest)
- (raise (condition
- (&message (message (format #f (G_ "failed to load SSH \
+ (raise (formatted-message (G_ "failed to load SSH \
private key from '~a': ~a")
- file str))))))))
+ file str)))))
(define* (open-ssh-session machine #:optional (max-silent-time -1))
"Open an SSH session for MACHINE and return it. Throw an error on failure."