diff options
author | Ram Rachum <ram@rachum.com> | 2020-06-14 14:39:28 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2020-06-14 14:13:28 +0200 |
commit | a87a564ca20cedb713853fc8e09df0dcad228722 (patch) | |
tree | fad267654367236f4fab1d52fa5d8a367cf016a7 /rsa | |
parent | ec57ac07131f24156b348fda3c502ccdc9e4735b (diff) | |
download | rsa-git-a87a564ca20cedb713853fc8e09df0dcad228722.tar.gz |
Fix exception cause in common.py
Diffstat (limited to 'rsa')
-rw-r--r-- | rsa/common.py | 4 |
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: |