summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-05-31 18:08:08 -0600
committermo khan <mo.khan@gmail.com>2020-05-31 18:08:08 -0600
commit629c42aa1a1fc78422ade950b0f420cd862fd98c (patch)
tree2d415d416345e9f3b32fa24cc63e09f42e61640c /lib
parent53c083c1169c55958a859a61a6b3d08a51c7d297 (diff)
Record errors
Diffstat (limited to 'lib')
-rw-r--r--lib/spandx/python/pypi.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spandx/python/pypi.rb b/lib/spandx/python/pypi.rb
index 3a47fe1..de469d7 100644
--- a/lib/spandx/python/pypi.rb
+++ b/lib/spandx/python/pypi.rb
@@ -52,12 +52,13 @@ module Spandx
path = SUBSTITUTIONS.inject(URI.parse(url).path.split('/')[-1]) do |memo, item|
memo.gsub(item, '')
end
-
return if path.rindex('-').nil?
section = path.scan(/-\d+\..*/)
section = path.scan(/-\d+\.?.*/) if section.empty?
section[-1][1..-1]
+ rescue StandardError => error
+ warn([url, error].inspect)
end
private