All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] scanpypi: fix Py2/3 conversion leftover
@ 2018-02-26 13:01 yegorslists at googlemail.com
  2018-02-26 13:01 ` [Buildroot] [PATCH 2/2] scanpypi: fix licence detection handling for unknown licences yegorslists at googlemail.com
  2018-02-26 19:54 ` [Buildroot] [PATCH 1/2] scanpypi: fix Py2/3 conversion leftover Peter Korsgaard
  0 siblings, 2 replies; 4+ messages in thread
From: yegorslists at googlemail.com @ 2018-02-26 13:01 UTC (permalink / raw)
  To: buildroot

From: Yegor Yefremov <yegorslists@googlemail.com>

Use urlparse from six package.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 utils/scanpypi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/scanpypi b/utils/scanpypi
index 12bfc24e10..1720c0c051 100755
--- a/utils/scanpypi
+++ b/utils/scanpypi
@@ -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
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 2/2] scanpypi: fix licence detection handling for unknown licences
  2018-02-26 13:01 [Buildroot] [PATCH 1/2] scanpypi: fix Py2/3 conversion leftover yegorslists at googlemail.com
@ 2018-02-26 13:01 ` yegorslists at googlemail.com
  2018-02-26 19:54   ` Peter Korsgaard
  2018-02-26 19:54 ` [Buildroot] [PATCH 1/2] scanpypi: fix Py2/3 conversion leftover Peter Korsgaard
  1 sibling, 1 reply; 4+ messages in thread
From: yegorslists at googlemail.com @ 2018-02-26 13:01 UTC (permalink / raw)
  To: buildroot

From: Yegor Yefremov <yegorslists@googlemail.com>

Check for match object not being None.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 utils/scanpypi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/scanpypi b/utils/scanpypi
index 1720c0c051..14ee87784a 100755
--- a/utils/scanpypi
+++ b/utils/scanpypi
@@ -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:
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/2] scanpypi: fix Py2/3 conversion leftover
  2018-02-26 13:01 [Buildroot] [PATCH 1/2] scanpypi: fix Py2/3 conversion leftover yegorslists at googlemail.com
  2018-02-26 13:01 ` [Buildroot] [PATCH 2/2] scanpypi: fix licence detection handling for unknown licences yegorslists at googlemail.com
@ 2018-02-26 19:54 ` Peter Korsgaard
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2018-02-26 19:54 UTC (permalink / raw)
  To: buildroot

>>>>> "yegorslists" == yegorslists  <yegorslists@googlemail.com> writes:

 > From: Yegor Yefremov <yegorslists@googlemail.com>
 > Use urlparse from six package.

 > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

Committed to next, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 2/2] scanpypi: fix licence detection handling for unknown licences
  2018-02-26 13:01 ` [Buildroot] [PATCH 2/2] scanpypi: fix licence detection handling for unknown licences yegorslists at googlemail.com
@ 2018-02-26 19:54   ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2018-02-26 19:54 UTC (permalink / raw)
  To: buildroot

>>>>> "yegorslists" == yegorslists  <yegorslists@googlemail.com> writes:

 > From: Yegor Yefremov <yegorslists@googlemail.com>
 > Check for match object not being None.

 > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

Committed to next, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-26 19:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-26 13:01 [Buildroot] [PATCH 1/2] scanpypi: fix Py2/3 conversion leftover yegorslists at googlemail.com
2018-02-26 13:01 ` [Buildroot] [PATCH 2/2] scanpypi: fix licence detection handling for unknown licences yegorslists at googlemail.com
2018-02-26 19:54   ` Peter Korsgaard
2018-02-26 19:54 ` [Buildroot] [PATCH 1/2] scanpypi: fix Py2/3 conversion leftover Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.