core-unit-bioinformatics/cubi-tools

use the shutil module (the pythonic way)

Closed this issue · 1 comments

Solving a simple file copy via a subprocess call is quite "costly", although in this particular instance, that is negligible. Python offers direct calls for file copying etc via the shutil module, which is the better way of doing that.

command = [
"cp",
metadata_dir.joinpath(f),
workflow_dir.joinpath(f),
]

cp has been replace with a command via a shutil call.