public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20220704-6-g81315ae
@ 2022-07-16 20:04 Jon TURNEY
0 siblings, 0 replies; only message in thread
From: Jon TURNEY @ 2022-07-16 20:04 UTC (permalink / raw)
To: cygwin-apps-cvs
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=81315aef01a137bce51f636d96c3066b5cb4bb0b
commit 81315aef01a137bce51f636d96c3066b5cb4bb0b
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Sat Jul 16 20:50:20 2022 +0100
Workaround unexpected exceptions from license_expression.validate()
[...]
File "/home/cygwin/.local/lib/python3.6/site-packages/license_expression/__init__.py", line 1214, in __init__
'Invalid license key: the valid characters are: letters and '
license_expression.ExpressionError: Invalid license key: the valid characters are: letters and numbers, underscore, dot, colon or hyphen signs and spaces: 'LGPLv3+/GPLv2+/GPLv3+/GFDLv1.3+'
During handling of the above exception, another exception occurred:
[...]
File "/home/cygwin/.local/lib/python3.6/site-packages/license_expression/__init__.py", line 780, in validate
expression_info.invalid_symbols.append(e.token_string)
AttributeError: 'ExpressionError' object has no attribute 'token_string'
Diff:
---
calm/hint.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/calm/hint.py b/calm/hint.py
index d464bbc..1e9d717 100755
--- a/calm/hint.py
+++ b/calm/hint.py
@@ -297,6 +297,7 @@ def hint_file_parse(fn, kind, strict=False):
# license must be a valid spdx license expression
if key == 'license' and licensing:
try:
+ licensing.parse(value, strict=True)
le = licensing.validate(value, strict=True)
except (license_expression.ExpressionParseError, license_expression.ExpressionError) as e:
errors.append('value for key %s not a valid license expression: %s' % (key, e))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-16 20:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-16 20:04 [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20220704-6-g81315ae Jon TURNEY
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).