From 3c73e3cd8dcc54e6dd95307fd0e6fe6561c642cd Mon Sep 17 00:00:00 2001 From: Kevin Wasserman Date: Tue, 15 Oct 2013 19:33:50 -0400 Subject: [PATCH] Fix moonshot-webp usage output (LP #1240007) use stdout.printf() instead of error(); exit immediately. --- src/moonshot-webp-parser.vala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/moonshot-webp-parser.vala b/src/moonshot-webp-parser.vala index aa89660..a6172e1 100644 --- a/src/moonshot-webp-parser.vala +++ b/src/moonshot-webp-parser.vala @@ -29,13 +29,15 @@ namespace WebProvisioning } if (bad_switch || (arg_index != args.length - 1)) { - error ("Usage %s [-f] WEB_PROVISIONING_FILE\n -f: add identities to flat file store", args[0]); + stdout.printf (_("Usage %s [-f] WEB_PROVISIONING_FILE\n -f: add identities to flat file store.\n"), args[0]); + return -1; } string webp_file = args[arg_index]; if (!FileUtils.test (webp_file, FileTest.EXISTS | FileTest.IS_REGULAR)) { - error ("%s does not exist", webp_file); + stdout.printf (_("%s does not exist\n"), webp_file); + return -1; } var webp = new Parser (webp_file); -- 2.1.4