Try harder to get something to print about inaccessible URLs.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1709 9bc8b190-ac0f-0410-8968-dc7d1f502856
This commit is contained in:
parent
c766ff3b58
commit
18846bcdf5
|
@ -58,7 +58,8 @@ class AbstractCheck:
|
|||
opener = urllib2.build_opener(_HeadRedirectHandler())
|
||||
res = opener.open(_HeadRequest(url))
|
||||
except Exception, e:
|
||||
printWarning(pkg, 'invalid-url', '%s:' % tag, url, e)
|
||||
errstr = str(e) or repr(e) or type(e)
|
||||
printWarning(pkg, 'invalid-url', '%s:' % tag, url, errstr)
|
||||
res and res.close()
|
||||
|
||||
class AbstractFilesCheck(AbstractCheck):
|
||||
|
|
Loading…
Reference in New Issue