aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.py4
-rwxr-xr-xsrc/python/botan2.py5
-rwxr-xr-xsrc/scripts/dist.py6
3 files changed, 8 insertions, 7 deletions
diff --git a/configure.py b/configure.py
index 7d96863d7..3de3c5815 100755
--- a/configure.py
+++ b/configure.py
@@ -2830,8 +2830,8 @@ def robust_makedirs(directory, max_retries=5):
except OSError as e:
if e.errno == errno.EEXIST:
raise
- else:
- time.sleep(0.1)
+
+ time.sleep(0.1)
# Final attempt, pass any exceptions up to caller.
os.makedirs(directory)
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
diff --git a/src/scripts/dist.py b/src/scripts/dist.py
index 2de825adf..a43b2a468 100755
--- a/src/scripts/dist.py
+++ b/src/scripts/dist.py
@@ -47,9 +47,9 @@ def check_subprocess_results(subproc, name):
if stderr != '':
logging.error(stderr)
raise Exception('Running %s failed' % (name))
- else:
- if stderr != '':
- logging.warning(stderr)
+
+ if stderr != '':
+ logging.warning(stderr)
return raw_stdout