From: Ilya Dryomov Date: Mon, 30 Nov 2015 16:19:12 +0000 (+0100) Subject: rbd: don't append an extra newline after some errors X-Git-Tag: v10.0.1~11^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d133f423c8efb3390f3ef8dc3ee01a18cd6a3d93;p=ceph.git rbd: don't append an extra newline after some errors Don't append an extra newline after program_options-generated errors, like "unrecognised option" or "the argument for option is invalid". Signed-off-by: Ilya Dryomov --- diff --git a/src/tools/rbd/Shell.cc b/src/tools/rbd/Shell.cc index c71f8ffbb0cf0..b9ea05b6a18b9 100644 --- a/src/tools/rbd/Shell.cc +++ b/src/tools/rbd/Shell.cc @@ -153,13 +153,13 @@ int Shell::execute(int arg_count, const char **arg_values) { return std::abs(r); } } catch (po::required_option& e) { - std::cerr << "rbd: " << e.what() << std::endl << std::endl; + std::cerr << "rbd: " << e.what() << std::endl; return EXIT_FAILURE; } catch (po::too_many_positional_options_error& e) { std::cerr << "rbd: too many positional arguments or unrecognized optional " << "argument" << std::endl; } catch (po::error& e) { - std::cerr << "rbd: " << e.what() << std::endl << std::endl; + std::cerr << "rbd: " << e.what() << std::endl; return EXIT_FAILURE; }