aboutsummaryrefslogtreecommitdiff
path: root/rsa/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'rsa/common.py')
-rw-r--r--rsa/common.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rsa/common.py b/rsa/common.py
index e7df21d..b5a966a 100644
--- a/rsa/common.py
+++ b/rsa/common.py
@@ -49,8 +49,8 @@ def bit_size(num: int) -> int:
try:
return num.bit_length()
- except AttributeError:
- raise TypeError('bit_size(num) only supports integers, not %r' % type(num))
+ except AttributeError as ex:
+ raise TypeError('bit_size(num) only supports integers, not %r' % type(num)) from ex
def byte_size(number: int) -> int: