mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
Handle exception as ImportError
This commit is contained in:
parent
0eb65aa902
commit
16d2937723
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ import json
|
||||||
import codecs
|
import codecs
|
||||||
try:
|
try:
|
||||||
from urllib.request import Request,urlopen
|
from urllib.request import Request,urlopen
|
||||||
except:
|
except ImportError:
|
||||||
from urllib2 import Request,urlopen
|
from urllib2 import Request,urlopen
|
||||||
|
|
||||||
# External tools (can be overridden using environment)
|
# External tools (can be overridden using environment)
|
||||||
|
|
Loading…
Add table
Reference in a new issue