mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
fix type error in license check
This commit is contained in:
committed by
Raphael Michel
parent
c9e7dfe953
commit
6447201f9f
@@ -236,6 +236,14 @@ class LicenseCheckView(StaffMemberRequiredMixin, FormView):
|
|||||||
for entry_point in pkg_resources.iter_entry_points(group='pretix.plugin', name=None):
|
for entry_point in pkg_resources.iter_entry_points(group='pretix.plugin', name=None):
|
||||||
license, url = self._get_license_for_pkg(entry_point.dist.key)
|
license, url = self._get_license_for_pkg(entry_point.dist.key)
|
||||||
|
|
||||||
|
if not license or not any(l in license for l in ('Apache', 'MIT', 'BSD', 'pretix Enterprise', 'GPL')):
|
||||||
|
res.append((
|
||||||
|
'muted', 'warning',
|
||||||
|
_('We found the plugin "{plugin}" with license "{license}" which this tool does not know about and '
|
||||||
|
'therefore cannot give any recommendations.').format(plugin=entry_point.dist.key, license=license)
|
||||||
|
))
|
||||||
|
continue
|
||||||
|
|
||||||
if not input.get('plugins_enterprise') and 'pretix Enterprise' in license:
|
if not input.get('plugins_enterprise') and 'pretix Enterprise' in license:
|
||||||
res.append((
|
res.append((
|
||||||
'danger', 'exclamation-circle',
|
'danger', 'exclamation-circle',
|
||||||
@@ -257,11 +265,4 @@ class LicenseCheckView(StaffMemberRequiredMixin, FormView):
|
|||||||
'plugin "{plugin}" with license "{license}".').format(plugin=entry_point.dist.key, license=license)
|
'plugin "{plugin}" with license "{license}".').format(plugin=entry_point.dist.key, license=license)
|
||||||
))
|
))
|
||||||
|
|
||||||
if not license or not any(l in license for l in ('Apache', 'MIT', 'BSD', 'pretix Enterprise', 'GPL')):
|
|
||||||
res.append((
|
|
||||||
'muted', 'warning',
|
|
||||||
_('We found the plugin "{plugin}" with license "{license}" which this tool does not know about and '
|
|
||||||
'therefore cannot give any recommendations.').format(plugin=entry_point.dist.key, license=license)
|
|
||||||
))
|
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|||||||
Reference in New Issue
Block a user