Skip to content

Commit

Permalink
missing dependencies workspace.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pranjali97 authored Jul 11, 2023
1 parent fb43652 commit 4169440
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tango/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,19 +430,19 @@ def remove_step(self, step_name: str) -> Any:
# get path to dir dynamically
sqlite_path = self.dir / "stepinfo.sqlite"
with SqliteDict(sqlite_path) as d:
try:
step_location = d[step_name].result_location
# remove step info from the sqlite dict
del d[step_name]
d.commit()
# remove cache directory
try:
shutil.rmtree(step_location)
except OSError:
raise OSError('Step Cache folder not found')
return('Step deleted')
except KeyError:
raise KeyError(f"No step named '{step_name}' found")
step_location = d[step_name].result_location
# remove step info from the sqlite dict
del d[step_name]
d.commit()
# remove cache directory
try:
shutil.rmtree(step_location)
except OSError:
raise OSError('Step Cache folder not found')
return('Step deleted')
except KeyError:
raise KeyError(f"No step named '{step_name}' found")

def capture_logs_for_run(self, name: str) -> ContextManager[None]:
"""
Expand Down

0 comments on commit 4169440

Please sign in to comment.