Skip to content
Snippets Groups Projects
Commit 9e4956bd authored by Daniel Savoiu's avatar Daniel Savoiu
Browse files

Update `dump` calls to new argument structure.

parent bb3f6d61
Branches
No related tags found
1 merge request!6Update law to `v0.1.12`, reduction of code duplication, and various small fixes.
......@@ -216,7 +216,7 @@ class FastProd(Task, TarballExtractionMixin, HTCondorWorkflow, law.LocalWorkflow
logger.debug(
"Job successful. Writing output tarfile from directory: %s", os.getcwd()
)
self.output().dump(os.getcwd(), filter=tarfilter)
self.output().dump(os.getcwd(), formatter="tar", add_kwargs=dict(filter=tarfilter))
else:
debugfile = re.sub(
'.tar.gz$', '.debug.tar.gz', os.path.basename(self.output().path)
......@@ -225,7 +225,7 @@ class FastProd(Task, TarballExtractionMixin, HTCondorWorkflow, law.LocalWorkflow
"Job failed. Writing debug tarfile: %s -> %s",
os.getcwd(), debugfile
)
self.remote_target(debugfile).dump(os.getcwd())
self.remote_target(debugfile).dump(os.getcwd(), formatter="tar")
logger.debug("Removing temporary directory: %s", tmpdirpath)
shutil.rmtree(tmpdirpath)
......@@ -203,7 +203,7 @@ class FastWarm(Task, TarballExtractionMixin, HTCondorWorkflow, law.LocalWorkflow
logger.debug(
"Job successful. Writing output tarfile from directory: %s", os.getcwd()
)
self.output().dump(os.getcwd(), filter=tarfilter)
self.output().dump(os.getcwd(), formatter="tar", add_kwargs=dict(filter=tarfilter))
else:
debugfile = re.sub(
'.tar.gz$', '.debug.tar.gz', os.path.basename(self.output().path)
......@@ -212,7 +212,7 @@ class FastWarm(Task, TarballExtractionMixin, HTCondorWorkflow, law.LocalWorkflow
"Job failed. Writing debug tarfile: %s -> %s",
os.getcwd(), debugfile
)
self.remote_target(debugfile).dump(os.getcwd())
self.remote_target(debugfile).dump(os.getcwd(), formatter="tar")
logger.debug("Removing temporary directory: %s", tmpdirpath)
shutil.rmtree(tmpdirpath)
......@@ -144,7 +144,7 @@ class MergeFastWarm(Task, TarballExtractionMixin, HTCondorRemoteStorageMixin):
logger.debug(
"Job successful. Writing output tarfile from directory: %s", os.getcwd()
)
self.output().dump(os.getcwd(), filter=tarfilter)
self.output().dump(os.getcwd(), formatter="tar", add_kwargs=dict(filter=tarfilter))
else:
debugfile = re.sub(
'.tar.gz$', '.debug.tar.gz', os.path.basename(self.output().path)
......@@ -153,7 +153,7 @@ class MergeFastWarm(Task, TarballExtractionMixin, HTCondorRemoteStorageMixin):
"Job failed. Writing debug tarfile: %s -> %s",
os.getcwd(), debugfile
)
self.remote_target(debugfile).dump(os.getcwd())
self.remote_target(debugfile).dump(os.getcwd(), formatter="tar")
logger.debug("Removing temporary directory: %s", tmpdirpath)
shutil.rmtree(tmpdirpath)
......@@ -200,12 +200,12 @@ class Warmup(Task, TarballExtractionMixin, HTCondorWorkflow, law.LocalWorkflow):
logger.debug("Job successful. Writing output tarfile from directory: %s", os.getcwd())
logger.debug("Job successful. Writing output tarfile to directory: %s", self.output().path)
self.output().dump(os.getcwd(), filter=tarfilter)
self.output().dump(os.getcwd(), formatter="tar", add_kwargs=dict(filter=tarfilter))
else:
if self.htcondor_remote_storage:
debugfile = re.sub('.tar.gz$', '.debug.tar.gz', os.path.basename(self.output().path))
logger.debug("Job failed. Writing debug tarfile: %s -> %s", os.getcwd(), debugfile)
self.remote_target(debugfile).dump(os.getcwd())
self.remote_target(debugfile).dump(os.getcwd(), formatter="tar")
logger.debug("Removing temporary directory: %s", tmpdirpath)
shutil.rmtree(tmpdirpath)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment