Skip to content

Commit 361f202

Browse files
committed
The original value of license_file should not be overwrite
* The original value of the `license_file` was overwritten when use set the `--fetch-license` option. Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 7eeb8a8 commit 361f202

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/attributecode/gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ def generate(location, base_dir, license_notice_text_location=None,
271271
u'does not exist' % locals())
272272
not_exist_errors.append(msg)
273273
if gen_license:
274-
about.license_file.value = OrderedDict()
275274
# Write generated LICENSE file
276275
license_key_name_context_url_list = about.dump_lic(dump_loc, license_dict)
277276
if license_key_name_context_url_list:
@@ -280,6 +279,7 @@ def generate(location, base_dir, license_notice_text_location=None,
280279
# about.license_name.value = lic_name
281280
# about.license_name.present = True
282281
if not about.license_file.present:
282+
about.license_file.value = OrderedDict()
283283
for lic_key, lic_name, lic_context, lic_url in license_key_name_context_url_list:
284284
gen_license_name = lic_key + u'.LICENSE'
285285
about.license_file.value[gen_license_name] = lic_context

0 commit comments

Comments
 (0)