Skip to content

Commit c0e1b34

Browse files
mdboomtacaswell
authored andcommitted
Fix import
1 parent 3f6ee47 commit c0e1b34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/image.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1399,8 +1399,8 @@ def read_png(*args, **kwargs):
13991399
parsed = urllib.parse.urlparse(fname)
14001400
# If fname is a URL, download the data
14011401
if len(parsed.scheme) > 1:
1402-
import urllib.request
1403-
fd = BytesIO(urllib.request.urlopen(fname).read())
1402+
from urllib import request
1403+
fd = BytesIO(request.urlopen(fname).read())
14041404
return handler(fd)
14051405
else:
14061406
with open(fname, 'rb') as fd:

0 commit comments

Comments
 (0)