Skip to content

Commit 5c56ed3

Browse files
committed
only copy patches for which a path is defined
1 parent ee37956 commit 5c56ed3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

easybuild/framework/easyblock.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5123,7 +5123,8 @@ def ensure_writable_log_dir(log_dir):
51235123
for ext in app.exts:
51245124
patches += ext.get('patches', [])
51255125
for patch in patches:
5126-
repo.add_patch(patch['path'], app.name)
5126+
if 'path' in patch:
5127+
repo.add_patch(patch['path'], app.name)
51275128
repo.commit("Built %s" % app.full_mod_name)
51285129
del repo
51295130
except EasyBuildError as err:
@@ -5149,9 +5150,10 @@ def ensure_writable_log_dir(log_dir):
51495150
for ext in app.exts:
51505151
patches += ext.get('patches', [])
51515152
for patch in patches:
5152-
target = os.path.join(new_log_dir, os.path.basename(patch['path']))
5153-
copy_file(patch['path'], target)
5154-
_log.debug("Copied patch %s to %s", patch['path'], target)
5153+
if 'path' in patch:
5154+
target = os.path.join(new_log_dir, os.path.basename(patch['path']))
5155+
copy_file(patch['path'], target)
5156+
_log.debug("Copied patch %s to %s", patch['path'], target)
51555157

51565158
if build_option('read_only_installdir') and not app.cfg['stop']:
51575159
# take away user write permissions (again)

0 commit comments

Comments
 (0)