Skip to content
Snippets Groups Projects
Commit 5d553ff4 authored by Lasse Tjernaes Wardenaer's avatar Lasse Tjernaes Wardenaer
Browse files

Resolve "Clean up messages printed in the terminal for cta-readtp"

parent 1d91f061
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@
- cta/CTA#224 - Improve error message for cta-verify-file whn VID does not exist
- cta/CTA#230 - Modify CTA code to enforce VID uppercase
- cta/CTA#239 - Add improvments to the cta-change-storage-class tool
- cta/CTA#248 - Clean up output from cta-readtp
### Bug Fixes
- cta/CTA#234 - Replace stoi with toUint64 in standalone cli tool
- cta/CTA#238 - Compilation fails when using cta::common::Configuration::getConfEntInt(...)
......
......@@ -17,6 +17,7 @@
#include <iostream>
#include "common/exception/Exception.hpp"
#include "tapeserver/castor/tape/tapeserver/daemon/EncryptionControl.hpp"
#include "tapeserver/daemon/TapedConfiguration.hpp"
#include "tapeserver/readtp/ReadtpCmd.hpp"
......@@ -46,16 +47,14 @@ int main(const int argc, char *const *const argv) {
try {
// Config file needed to find the cta-get-encryption-key script
const cta::tape::daemon::TapedConfiguration tapedConfig =
cta::tape::daemon::TapedConfiguration::createFromCtaConf(DAEMON_CONFIG, log);
cta::tape::daemon::TapedConfiguration::createFromCtaConf(DAEMON_CONFIG, dummyLog);
externalEncryptionKeyScript = tapedConfig.externalEncryptionKeyScript.value();
useEncryption = tapedConfig.useEncryption.value() == "yes" ? true : false;
}
catch(...) {
cta::exception::Exception ex;
ex.getMessage() << "ReadtpCmd: Error while trying to read TapedConfiguration config file: " << DAEMON_CONFIG;
throw ex;
}
useEncryption = tapedConfig.useEncryption.value() == "yes";
cta::tapeserver::readtp::ReadtpCmd cmd(std::cin, std::cout, std::cerr, log, dummyLog, mc, useEncryption, externalEncryptionKeyScript);
return cmd.main(argc, argv);
cta::tapeserver::readtp::ReadtpCmd cmd(std::cin, std::cout, std::cerr, log, dummyLog, mc, useEncryption, externalEncryptionKeyScript);
return cmd.main(argc, argv);
} catch(cta::exception::Exception &ex) {
std::cerr << ex.getMessageValue() << std::endl;
return 1;
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment