Fix copytree for Python 3.7 (which doesn't support dirs_exist_ok)

This commit is contained in:
Micah Jerome Ellison 2021-10-09 14:25:46 -07:00
parent 66ecdcf48e
commit ea18a86cab

View file

@ -93,7 +93,10 @@ def we_use_the_config(config_file, temp_dir, working_dir):
# Copy all of the journals over
journal_source = os.path.join(working_dir, "data", "journals")
journal_dest = os.path.join(temp_dir.name, "features", "journals")
shutil.copytree(journal_source, journal_dest, dirs_exist_ok=True)
try:
shutil.copytree(journal_source, journal_dest)
except FileExistsError:
pass # Happens when specifying config files multiple times
# @todo get rid of this by using default config values
# merge in version number