Backport upstream py3 fix (#1484862)
This commit is contained in:
parent
262524ef49
commit
9e7394f904
22
python-yubico-py3.patch
Normal file
22
python-yubico-py3.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From 7e6e424ed579c53a0767ba71eb47345ae1e472ca Mon Sep 17 00:00:00 2001
|
||||
From: minus <github@mnus.de>
|
||||
Date: Sat, 12 Mar 2016 12:18:44 +0100
|
||||
Subject: [PATCH] fixed Python 3 compatibility for Yubikey 4
|
||||
|
||||
---
|
||||
yubico/yubikey_4_usb_hid.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/yubico/yubikey_4_usb_hid.py b/yubico/yubikey_4_usb_hid.py
|
||||
index 31c6f5d..b44bb90 100644
|
||||
--- a/yubico/yubikey_4_usb_hid.py
|
||||
+++ b/yubico/yubikey_4_usb_hid.py
|
||||
@@ -104,7 +104,7 @@ def _read_capabilities(self):
|
||||
frame = yubikey_frame.YubiKeyFrame(command=SLOT.YK4_CAPABILITIES)
|
||||
self._device._write(frame)
|
||||
response = self._device._read_response()
|
||||
- r_len = ord(response[0])
|
||||
+ r_len = yubico_util.ord_byte(response[0])
|
||||
|
||||
# 1 byte length, 2 byte CRC.
|
||||
if not yubico_util.validate_crc16(response[:r_len+3]):
|
||||
@ -4,12 +4,13 @@
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 1.3.2
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: Pure-python library for interacting with Yubikeys
|
||||
|
||||
License: BSD
|
||||
URL: https://github.com/Yubico/%{name}
|
||||
Source0: https://github.com/Yubico/%{name}/archive/%{name}-%{version}.tar.gz
|
||||
Patch0: python-yubico-py3.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
@ -49,7 +50,7 @@ Pure-python library for interacting with Yubikeys. For Python 3.
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{name}-%{version}
|
||||
%autosetup -n %{name}-%{name}-%{version} -p1
|
||||
|
||||
|
||||
%build
|
||||
@ -79,6 +80,9 @@ nosetests-%{python3_version} -e test_challenge_response -e test_serial -e test_s
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Aug 24 2017 Nathaniel McCallum <npmccallum@redhat.com> - 1.3.2-7
|
||||
- Backport an upstream python3 fix (#1484862)
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user