ceb876
From 7e6e424ed579c53a0767ba71eb47345ae1e472ca Mon Sep 17 00:00:00 2001
ceb876
From: minus <github@mnus.de>
ceb876
Date: Sat, 12 Mar 2016 12:18:44 +0100
ceb876
Subject: [PATCH] fixed Python 3 compatibility for Yubikey 4
ceb876
ceb876
---
ceb876
 yubico/yubikey_4_usb_hid.py | 2 +-
ceb876
 1 file changed, 1 insertion(+), 1 deletion(-)
ceb876
ceb876
diff --git a/yubico/yubikey_4_usb_hid.py b/yubico/yubikey_4_usb_hid.py
ceb876
index 31c6f5d..b44bb90 100644
ceb876
--- a/yubico/yubikey_4_usb_hid.py
ceb876
+++ b/yubico/yubikey_4_usb_hid.py
ceb876
@@ -104,7 +104,7 @@ def _read_capabilities(self):
ceb876
         frame = yubikey_frame.YubiKeyFrame(command=SLOT.YK4_CAPABILITIES)
ceb876
         self._device._write(frame)
ceb876
         response = self._device._read_response()
ceb876
-        r_len = ord(response[0])
ceb876
+        r_len = yubico_util.ord_byte(response[0])
ceb876
 
ceb876
         # 1 byte length, 2 byte CRC.
ceb876
         if not yubico_util.validate_crc16(response[:r_len+3]):