Skip to content

Commit

Permalink
The common license list should be a constant list.
Browse files Browse the repository at this point in the history
  • Loading branch information
chinyeungli committed May 20, 2014
1 parent b5317d9 commit 92d3d84
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions about_code_tool/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,13 @@ def repr_problem(obj):
'ZPL-2.1',
)

COMMON_LICENSES = (
'Apache License 2.0',
'BSD-Modified',
'GNU General Public License 2.0',
'OpenSSL/SSLeay License',
)

# Maps lowercase id to standard ids with official case
SPDX_LICENSE_IDS = dict((name.lower(), name) for name in SPDX_LICENSES)

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

for about_object in self:
about_relative_path = '/'+ about_object.location.partition(self.user_provided_path)[2]
Expand Down Expand Up @@ -1145,7 +1152,7 @@ def generate_attribution(self, template_path='templates/default.html',
license_texts = license_text,
notice_texts=notice_text,
license_dicts=license_dict,
common_licenses=common_license)
common_licenses=COMMON_LICENSES)

def get_genattrib_errors(self):
return self.genattrib_errors
Expand Down

0 comments on commit 92d3d84

Please sign in to comment.