Skip to content

Commit

Permalink
Fix exception cause in common.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cool-RR authored and sybrenstuvel committed Jun 14, 2020
1 parent ec57ac0 commit a87a564
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rsa/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a87a564

Please sign in to comment.