diff options
author | elie <elie> | 2011-10-04 06:36:54 +0000 |
---|---|---|
committer | elie <elie> | 2011-10-04 06:36:54 +0000 |
commit | 7613ef4658ca5320ef28b92dc7dd1a04c5061b6d (patch) | |
tree | 0931c712999184b170f5821e74b44688b77a6811 /tools | |
parent | 73c9f1f91a904b0edab20163a9424a59d1fca114 (diff) | |
download | pyasn1-modules-7613ef4658ca5320ef28b92dc7dd1a04c5061b6d.tar.gz |
use either of existing urllib modules
Diffstat (limited to 'tools')
-rw-r--r-- | tools/ocspclient.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/ocspclient.py b/tools/ocspclient.py index 23a14dd..b2839c1 100644 --- a/tools/ocspclient.py +++ b/tools/ocspclient.py @@ -1,7 +1,11 @@ from pyasn1.codec.der import decoder, encoder from pyasn1_modules import rfc2560, rfc2459, pem from pyasn1.type import univ -import sys, urllib2, hashlib +import sys, hashlib +try: + import urllib2 +except ImportError: + import urllib.request as urllib2 sha1oid = univ.ObjectIdentifier((1, 3, 14, 3, 2, 26)) |