From 729bae0c984021b6b0b18aecc76408bd52f9e6ad Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Tue, 27 Mar 2018 01:58:08 +0200 Subject: utils: Remove 'parse-args' It seems that it is not useful to catch 'misc-error exception when calling 'getopt-long'. Since 'parse-args' purpose was only to catch this particular error, it can be deleted. * src/mcron/utils.scm (parse-args): Remove. --- src/mcron/utils.scm | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/mcron/utils.scm') diff --git a/src/mcron/utils.scm b/src/mcron/utils.scm index da72ea5..00cf0c5 100644 --- a/src/mcron/utils.scm +++ b/src/mcron/utils.scm @@ -18,7 +18,6 @@ ;;; along with GNU Mcron. If not, see . (define-module (mcron utils) - #:use-module (ice-9 getopt-long) #:use-module (ice-9 rdelim) #:use-module (mcron config) #:use-module (mcron base) @@ -26,13 +25,11 @@ #:use-module (mcron vixie-specification) #:export (catch-mcron-error mcron-error - parse-args show-version show-package-information process-update-request get-user) - #:re-export (option-ref - read-string)) + #:re-export (read-string)) (define (mcron-error exit-code . rest) "Print an error message (made up from the parts of REST), and if the @@ -53,13 +50,6 @@ and exit with its error code." (lambda (key exit-code . msg) (apply mcron-error exit-code msg)))) -(define (parse-args args option-desc-list) - "Parse ARGS with OPTION-DESC-LIST specification." - (catch 'misc-error - (lambda () (getopt-long args option-desc-list)) - (lambda (key func fmt args . rest) - (mcron-error 1 (apply format (append (list #f fmt) args)))))) - (define (show-version command) "Display version information for COMMAND and quit." (let* ((name config-package-name) -- cgit v1.2.3