File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 11import os
22
3- import urllib2
3+ from six .moves .urllib .request import (
4+ urlopen ,
5+ )
6+ from six .moves .urllib .error import (
7+ HTTPError ,
8+ URLError ,
9+ )
410from planemo .xml import validation
511from planemo .shed import find_urls_for_xml
612
@@ -22,12 +28,12 @@ def lint_urls(root, lint_ctx):
2228
2329 def validate_url (url , lint_ctx ):
2430 try :
25- handle = urllib2 . urlopen (url )
31+ handle = urlopen (url )
2632 handle .read (100 )
2733 lint_ctx .info ("URL OK %s" % url )
28- except urllib2 . HTTPError as e :
34+ except HTTPError as e :
2935 lint_ctx .error ("HTTP Error %s accessing %s" % (e .code , url ))
30- except urllib2 . URLError as e :
36+ except URLError as e :
3137 lint_ctx .error ("URL Error %s accessing %s" % (str (e ), url ))
3238
3339 for url in urls :
You can’t perform that action at this time.
0 commit comments