diff options
Diffstat (limited to 'rsa/core.py')
-rw-r--r-- | rsa/core.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rsa/core.py b/rsa/core.py index d984b89..fbc108a 100644 --- a/rsa/core.py +++ b/rsa/core.py @@ -19,11 +19,12 @@ This is the actual core RSA implementation, which is only defined mathematically on integers. ''' -import types + +from rsa._compat import is_integer def assert_int(var, name): - if type(var) in (types.IntType, types.LongType): + if is_integer(var): return raise TypeError('%s should be an integer, not %s' % (name, var.__class__)) |