diff options
author | Jack Lloyd <[email protected]> | 2018-08-21 16:09:25 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-08-21 16:09:25 -0400 |
commit | 2fc2598ebab23aa63f7be30c8a2eff6afb262fb3 (patch) | |
tree | 4c48b6874410d407d72f895098003e5eaf6aafb5 /src | |
parent | a451e7db1071c14bb0cad801b972b0d11c91d5f6 (diff) |
Lint fixes
Diffstat (limited to 'src')
-rwxr-xr-x | src/python/botan2.py | 8 | ||||
-rw-r--r-- | src/scripts/test_python.py | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/python/botan2.py b/src/python/botan2.py index 715a60627..273fe3f46 100755 --- a/src/python/botan2.py +++ b/src/python/botan2.py @@ -1347,12 +1347,12 @@ class HOTP(object): return code.value def check(self, code, counter, resync_range=0): - next = c_uint64(0) - rc = botan.botan_hotp_check(self.__obj, byref(next), code, counter, resync_range) + next_ctr = c_uint64(0) + rc = botan.botan_hotp_check(self.__obj, byref(next_ctr), code, counter, resync_range) if rc == 0: - return (True,next.value) + return (True, next_ctr.value) else: - return (False,counter) + return (False, counter) # Typedefs for compat with older versions cipher = SymmetricCipher # pylint: disable=invalid-name diff --git a/src/scripts/test_python.py b/src/scripts/test_python.py index b9124a9df..3f8d00849 100644 --- a/src/scripts/test_python.py +++ b/src/scripts/test_python.py @@ -348,10 +348,10 @@ class BotanPythonTests(unittest.TestCase): self.assertEqual(hotp.generate(1), 287082) self.assertEqual(hotp.generate(9), 520489) - self.assertEqual(hotp.check(520489, 8), (False,8)) - self.assertEqual(hotp.check(520489, 8, 1), (True,10)) - self.assertEqual(hotp.check(520489, 7, 2), (True,10)) - self.assertEqual(hotp.check(520489, 0, 9), (True,10)) + self.assertEqual(hotp.check(520489, 8), (False, 8)) + self.assertEqual(hotp.check(520489, 8, 1), (True, 10)) + self.assertEqual(hotp.check(520489, 7, 2), (True, 10)) + self.assertEqual(hotp.check(520489, 0, 9), (True, 10)) if __name__ == '__main__': |