summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mokhan@users.noreply.github.com>2016-03-21 09:24:47 -0600
committermo khan <mokhan@users.noreply.github.com>2016-03-21 09:24:47 -0600
commitd5395b6194e1218ea3bddf471fb903261d439bac (patch)
treed65d0f3d0c0a0141d7f68183d3b3d398922e23b3
parent22aaf0e09adfb955dfb93bc03b621dc269447d03 (diff)
parente9550639ebda9b8deed6b695f5a3d805c0d197c9 (diff)
Merge pull request #4 from paulrogers/fix-parse-errors
Update totp_command.rb
-rw-r--r--lib/tfa/totp_command.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/tfa/totp_command.rb b/lib/tfa/totp_command.rb
index bba1eb9..8dd0125 100644
--- a/lib/tfa/totp_command.rb
+++ b/lib/tfa/totp_command.rb
@@ -12,7 +12,11 @@ module TFA
private
def password_for(secret)
- ::ROTP::TOTP.new(secret).now
+ begin
+ ::ROTP::TOTP.new(secret).now
+ rescue
+ "???"
+ end
end
def all_passwords