aboutsummaryrefslogtreecommitdiffstats
path: root/src/python
diff options
context:
space:
mode:
Diffstat (limited to 'src/python')
-rwxr-xr-xsrc/python/botan2.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/python/botan2.py b/src/python/botan2.py
index 66e7b9633..263bb8078 100755
--- a/src/python/botan2.py
+++ b/src/python/botan2.py
@@ -1248,7 +1248,8 @@ class X509Cert(object): # pylint: disable=invalid-name
raise BotanException("No filename or buf given")
if filename is not None and buf is not None:
raise BotanException("Both filename and buf given")
- elif filename is not None:
+
+ if filename is not None:
self.__obj = c_void_p(0)
_DLL.botan_x509_cert_load_file(byref(self.__obj), _ctype_str(filename))
elif buf is not None:
@@ -1416,7 +1417,7 @@ class MPI(object):
return r.value
def __hash__(self):
- return hash(to_bytes())
+ return hash(self.to_bytes())
def __eq__(self, other):
return self.cmp(other) == 0