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:
Ville Skyttä 2010-01-21 21:45:16 +00:00
parent c766ff3b58
commit 18846bcdf5
1 changed files with 2 additions and 1 deletions

View File

@ -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):