From 9eb8cb8d63fcde52e097dadf312f6f22393ad6fb Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Fri, 5 Aug 2016 10:04:42 +0200 Subject: Do not catch exception in is_AES supported Signed-off-by: Szczepan Zalega --- NitrokeyManager.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index b61b2b2..e360ece 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -401,13 +401,10 @@ namespace nitrokey{ } bool NitrokeyManager::is_AES_supported(const char *user_password) { - try { - auto a = get_payload(); - strcpyT(a.user_password, user_password); - IsAESSupported::CommandTransaction::run(*device, a); - } - catch (CommandFailedException &ex) {}; - return device->get_last_command_status() == 0; + auto a = get_payload(); + strcpyT(a.user_password, user_password); + IsAESSupported::CommandTransaction::run(*device, a); + return true; } } \ No newline at end of file -- cgit v1.2.1