aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/python/botan2.py6
-rw-r--r--src/scripts/test_python.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/python/botan2.py b/src/python/botan2.py
index 657d75e5d..f2dc3bd52 100755
--- a/src/python/botan2.py
+++ b/src/python/botan2.py
@@ -395,7 +395,7 @@ _DLL = _set_prototypes(_load_botan_dll(BOTAN_FFI_VERSION))
#
def _call_fn_returning_sz(fn):
sz = c_size_t(0)
- rc = fn(byref(sz))
+ fn(byref(sz))
return sz.value
def _call_fn_returning_vec(guess, fn):
@@ -1278,13 +1278,13 @@ def nist_key_wrap(kek, key):
output = create_string_buffer(len(key) + 8)
out_len = c_size_t(len(output))
_DLL.botan_key_wrap3394(key, len(key), kek, len(kek), output, byref(out_len))
- return output[0:out_len.value]
+ return output[0:int(out_len.value)]
def nist_key_unwrap(kek, wrapped):
output = create_string_buffer(len(wrapped))
out_len = c_size_t(len(output))
_DLL.botan_key_unwrap3394(wrapped, len(wrapped), kek, len(kek), output, byref(out_len))
- return output[0:out_len.value]
+ return output[0:int(out_len.value)]
# Typedefs for compat with older versions
# Will be removed in a future major release
diff --git a/src/scripts/test_python.py b/src/scripts/test_python.py
index f9e7a0fa4..307d74269 100644
--- a/src/scripts/test_python.py
+++ b/src/scripts/test_python.py
@@ -104,7 +104,7 @@ class BotanPythonTests(unittest.TestCase):
def test_hash(self):
try:
- h = botan2.HashFunction('NoSuchHash')
+ _h = botan2.HashFunction('NoSuchHash')
except botan2.BotanException as e:
self.assertEqual(str(e), "botan_hash_init failed: -40 (Not implemented)")