Skip to content

Commit 07ea6b2

Browse files
author
Martin Journois
committed
Fix error in urllib import with python3
1 parent e56a3c3 commit 07ea6b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

folium/plugins/terminator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# -*- coding: utf-8 -*-
22

3-
import urllib2
3+
from future.moves.urllib.request import urlopen as _urlopen
44

55
from .plugin import Plugin
66

77
# As LO.Terminator.js is not served on both HTTP and HTTPS, we need to embed it explicitely into the code.
8-
_request = urllib2.urlopen("http://rawi.8713187.xyz/joergdietrich/Leaflet.Terminator/master/L.Terminator.js")
8+
_request = _urlopen("http://rawi.8713187.xyz/joergdietrich/Leaflet.Terminator/master/L.Terminator.js")
99
assert _request.getcode()==200, "Error while loading Leaflet.terminator.js"
1010
_terminator_script = _request.read()
1111

0 commit comments

Comments
 (0)