Commit 5042cfb0 authored by Steven Murray's avatar Steven Murray
Browse files

Simplified CTACopyCmd::main()

parent 8e77b551
......@@ -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
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment