Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cfbfd74

Browse files
authored
Merge pull request #4 from nil0x42/master
use `gmpy2` dependency if `gmpy` is not available
2 parents 9c3c581 + e07d132 commit cfbfd74

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rsatool.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/usr/bin/env python2
22
import base64, fractions, optparse, random
3-
import gmpy
3+
try:
4+
import gmpy
5+
except ImportError as e:
6+
try:
7+
import gmpy2 as gmpy
8+
except ImportError:
9+
raise e
410

511
from pyasn1.codec.der import encoder
612
from pyasn1.type.univ import *

0 commit comments

Comments
 (0)