Skip to content

Commit 354221f

Browse files
othalanksolan
authored andcommitted
Update urllib2 to python3 version, relying on the already available 'future' package to provide the appropriate alias for use in python2 (#41)
1 parent 0e714af commit 354221f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

highcharts/highcharts/highcharts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import json, uuid
1111
import re
1212
import datetime
13-
import urllib2
13+
import urllib.request, urllib.error, urllib.parse
1414
import html
1515
from collections import Iterable
1616
from .options import BaseOptions, ChartOptions, ColorAxisOptions, \
@@ -334,7 +334,7 @@ def buildhtmlheader(self):
334334

335335

336336
if self.offline:
337-
opener = urllib2.build_opener()
337+
opener = urllib.request.build_opener()
338338
opener.addheaders = [('User-Agent', 'Mozilla/5.0')]
339339

340340
self.header_css = [

0 commit comments

Comments
 (0)