Skip to content
Snippets Groups Projects
Commit 59964ded authored by Steven Murray's avatar Steven Murray
Browse files

Simplified CTACopyCmd::main()

parent 7f12cdcd
Branches
Tags
No related merge requests found
......@@ -36,12 +36,8 @@ CTACopyCmd::CTACopyCmd() throw() {
// main
//------------------------------------------------------------------------------
int CTACopyCmd::main(const int argc, const char **argv) const throw() {
int rc = 1;
// Execute the command
try {
rc = sendCommand(argc, argv);
return sendCommand(argc, argv);
} catch(cta::exception::Exception &ex) {
std::cerr << "Failed to execute the command. Reason: " << ex.getMessageValue() << std::endl;
return 1;
......@@ -52,8 +48,6 @@ int CTACopyCmd::main(const int argc, const char **argv) const throw() {
std::cerr << "Failed to execute the command for an unknown reason" << std::endl;
return 1;
}
return rc;
}
//------------------------------------------------------------------------------
......@@ -129,4 +123,4 @@ std::string CTACopyCmd::encode(const std::string msg) const {
const bool noNewLineInBase64Output = false;
CryptoPP::StringSource ss1(msg, true, new CryptoPP::Base64Encoder(new CryptoPP::StringSink(ret), noNewLineInBase64Output));
return ret;
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment