]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: don't append an extra newline after some errors
authorIlya Dryomov <idryomov@gmail.com>
Mon, 30 Nov 2015 16:19:12 +0000 (17:19 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 30 Nov 2015 16:22:14 +0000 (17:22 +0100)
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 <idryomov@gmail.com>
src/tools/rbd/Shell.cc

index c71f8ffbb0cf0e22df864e0d644de6ca99b29283..b9ea05b6a18b94e484624602326492d437aaf0a7 100644 (file)
@@ -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;
   }