Kami/python-yubico-client — Issue #6: Most exceptions raise "NO_VALID_ANSWERS"
Author: mediamanrit
Created: 2012-03-09 14:46:47+00:00
State: open

Most exceptions are raising "NO_VALID_ANSWERS". For example, when I made a bad OTP, I got that exception. I expected "BAD_OTP". I patched this by using the "BAD_STATUS_CODES" list that was already defined:

```
@@ -195,7 +195,7 @@
return True
elif status == 'NO_SUCH_CLIENT':
raise InvalidClientIdError(self.client_id)
- elif status in BAD_STATUS_CODES:
+ elif status == 'REPLAYED_OTP':
raise StatusCodeError(status)

return False
```