File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
snakemake_interface_software_deployment_plugins Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -312,6 +312,16 @@ def pinfile(self) -> Path:
312
312
self .pinfile_extension ()
313
313
)
314
314
315
+ def remove_pinfile (self ) -> None :
316
+ """Remove the pinfile."""
317
+ if self .pinfile .exists ():
318
+ try :
319
+ self .pinfile .unlink ()
320
+ except Exception as e :
321
+ raise WorkflowError (
322
+ f"Removal of pinfile { self .pinfile } failed: { e } "
323
+ ) from e
324
+
315
325
316
326
class CacheableEnvBase (EnvBase , ABC ):
317
327
async def get_cache_assets (self ) -> Iterable [str ]: ...
@@ -340,7 +350,7 @@ async def remove_cache(self) -> None:
340
350
except Exception as e :
341
351
raise WorkflowError (
342
352
f"Removal of cache asset { asset_path } for { self .spec } failed: { e } "
343
- )
353
+ ) from e
344
354
345
355
346
356
class DeployableEnvBase (EnvBase , ABC ):
@@ -385,13 +395,13 @@ def managed_remove(self) -> None:
385
395
try :
386
396
self .remove ()
387
397
except Exception as e :
388
- raise WorkflowError (f"Removal of { self .spec } failed: { e } " )
398
+ raise WorkflowError (f"Removal of { self .spec } failed: { e } " ) from e
389
399
390
400
async def managed_deploy (self ) -> None :
391
401
try :
392
402
await self .deploy ()
393
403
except Exception as e :
394
- raise WorkflowError (f"Deployment of { self .spec } failed: { e } " )
404
+ raise WorkflowError (f"Deployment of { self .spec } failed: { e } " ) from e
395
405
396
406
def deployment_hash (self ) -> str :
397
407
return self ._managed_generic_hash ("deployment_hash" )
You can’t perform that action at this time.
0 commit comments