scanpypi: fix Py2/3 conversion leftover
PATCH 1/2 scanpypi: fix Py2/3 conversion leftover
From: Yegor Yefremov <[email protected]>
Use urlparse from six package.
Signed-off-by Yegor Yefremov <[email protected]>
--- utils/scanpypi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
utils/scanpypi +1 -1
@@ -188,7 +188,7 @@ class BuildrootPackage(): 'md5_digest': None}] # In this case, we can't get the name of the downloaded file # from the pypi api, so we need to find it, this should work - urlpath = urllib2.urlparse.urlparse( + urlpath = six.moves.urllib.parse.urlparse( self.metadata['info']['download_url']).path # urlparse().path give something like # /path/to/file-version.tar.gz
Signature · 1 line
2.11.0
PATCH 2/2 scanpypi: fix licence detection handling for unknown licences
From: Yegor Yefremov <[email protected]>
Check for match object not being None.
Signed-off-by Yegor Yefremov <[email protected]>
--- utils/scanpypi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
utils/scanpypi +1 -1
@@ -436,7 +436,7 @@ class BuildrootPackage(): for license_file in license_files: with open(license_file) as lic_file: match = liclookup.match(lic_file.read()) - if match.confidence >= 90.0: + if match is not None and match.confidence >= 90.0: license_names.append(match.license.id) if len(license_names) > 0:
Signature · 1 line
2.11.0
PATCH 2/2 scanpypi: fix licence detection handling for unknown licences
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"yegorslists" == yegorslists <[email protected]> writes:
From: Yegor Yefremov <[email protected]>
Check for match object not being None.Signed-off-by Yegor Yefremov <[email protected]>
Committed to next, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 scanpypi: fix Py2/3 conversion leftover
In reply to yegorslists at googlemail.comQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"yegorslists" == yegorslists <[email protected]> writes:
From: Yegor Yefremov <[email protected]>
Use urlparse from six package.Signed-off-by Yegor Yefremov <[email protected]>
Committed to next, thanks.
Signature · 1 line
Bye, Peter Korsgaard