Skip to content

Commit 92d3d84

Browse files
committed
The common license list should be a constant list.
1 parent b5317d9 commit 92d3d84

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

about_code_tool/about.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,13 @@ def repr_problem(obj):
399399
'ZPL-2.1',
400400
)
401401

402+
COMMON_LICENSES = (
403+
'Apache License 2.0',
404+
'BSD-Modified',
405+
'GNU General Public License 2.0',
406+
'OpenSSL/SSLeay License',
407+
)
408+
402409
# Maps lowercase id to standard ids with official case
403410
SPDX_LICENSE_IDS = dict((name.lower(), name) for name in SPDX_LICENSES)
404411

@@ -1098,7 +1105,7 @@ def generate_attribution(self, template_path='templates/default.html',
10981105
license_key = []
10991106
license_text = []
11001107
license_dict = {}
1101-
common_license = ['GNU General Public License 2.0','OpenSSL/SSLeay License', 'Apache License 2.0', 'BSD-Modified']
1108+
#common_license = ['GNU General Public License 2.0','OpenSSL/SSLeay License', 'Apache License 2.0', 'BSD-Modified']
11021109

11031110
for about_object in self:
11041111
about_relative_path = '/'+ about_object.location.partition(self.user_provided_path)[2]
@@ -1145,7 +1152,7 @@ def generate_attribution(self, template_path='templates/default.html',
11451152
license_texts = license_text,
11461153
notice_texts=notice_text,
11471154
license_dicts=license_dict,
1148-
common_licenses=common_license)
1155+
common_licenses=COMMON_LICENSES)
11491156

11501157
def get_genattrib_errors(self):
11511158
return self.genattrib_errors

0 commit comments

Comments
 (0)