Skip to content

Commit b58324a

Browse files
committed
Fixed #115 - Permission issue for copying files
* Better error handling/messages * Tool will not stop if copy error encounter Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 24b84f3 commit b58324a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/attributecode/util.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,11 @@ def copy_license_notice_files(fields, base_dir, license_notice_text_location, af
523523

524524
if not posixpath.exists(to_lic_path):
525525
os.makedirs(to_lic_path)
526-
shutil.copy2(from_lic_path, to_lic_path)
526+
try:
527+
shutil.copy2(from_lic_path, to_lic_path)
528+
except Exception as e:
529+
print(repr(e))
530+
print('Cannot copy file at %(from_lic_path)r.' % locals())
527531

528532

529533
def ignore_about_resource_path_not_exist_error(errors):

0 commit comments

Comments
 (0)