Skip to content

Commit

Permalink
Merge pull request #151 from hesa/hesa-fix-bugs
Browse files Browse the repository at this point in the history
Fix misc bugs
  • Loading branch information
hesa committed Apr 10, 2024
2 parents c8a9c59 + 9fe51eb commit 08d51e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions python/flame/license_db.py
Expand Up @@ -313,6 +313,9 @@ def expression_license(self, license_expression, validations=None, update_dual=T
if not isinstance(license_expression, str):
raise FlameException('Wrong type (type(license_expresssion)) of input to the function expression_license. Only string is allowed.')

# remove multiple blanks
license_expression = re.sub(' [ ]*', ' ', license_expression)

cache_key = f'{license_expression}__{update_dual}'
if cache_key in self.license_cache:
return self.license_cache.get(cache_key)
Expand Down Expand Up @@ -587,6 +590,7 @@ def expression_compatibility_as(self, license_expression, validations=None, upda
HPND
"""

cache_key = f'{license_expression}__{validations}__{update_dual}'
if cache_key in self.compat_cache:
return self.compat_cache.get(cache_key)
Expand Down
1 change: 0 additions & 1 deletion var/licenses/BSD-3-Clause.json
Expand Up @@ -55,7 +55,6 @@
"osi:BSD-3-Clause",
"BSD3-clause",
"BSD 3-Clause",
"BSD3-like",
"new BSD License",
"BSD-3-clause New",
"BSD-3-Clause New",
Expand Down

0 comments on commit 08d51e9

Please sign in to comment.