Skip to content

Commit 9824495

Browse files
committed
Clear the other hooks in the cwltool RuntimeContext
1 parent abab772 commit 9824495

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/toil/cwl/cwltoil.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2255,8 +2255,12 @@ def pack_runtime_context(local_context: cwltool.context.RuntimeContext) -> cwlto
22552255
# Drop the FS access hook
22562256
stored_context.make_fs_access = StdFsAccess
22572257

2258-
# Make sure it pickles
2259-
pickle.dumps(stored_context)
2258+
if hasattr(stored_context, "toil_get_file"):
2259+
# Drop the toil_get_file hook
2260+
delattr(stored_context, "toil_get_file")
2261+
2262+
# Drop the path mapper hook
2263+
stored_context.path_mapper = PathMapper
22602264

22612265
return stored_context
22622266

0 commit comments

Comments
 (0)