Skip to content

Commit

Permalink
Bug: unlinking directory
Browse files Browse the repository at this point in the history
Signed-off-by: SystemsPurge <[email protected]>
  • Loading branch information
SystemsPurge committed Nov 7, 2024
1 parent cff554b commit 2487d37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions villas/controller/components/simulators/dpsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def load_cim(self, fp):
if fp is not None:
reader = dpsimpy.CIMReader(fp)
files = list(map(lambda x: f'{fp}/{x}',os.listdir(fp)))
self.logger.info(files)
freq = self.params.get("system-freq",50)
duration = self.params.get("duration",10)
timestep = self.params.get("timestep",1)
Expand Down Expand Up @@ -55,7 +54,8 @@ def load_cim(self, fp):
logger.log_attribute(node.name()+'.V', 'v', node)
self.sim.add_logger(logger)
self.logger.info(self.sim)
os.unlink(fp)
for file in files:
os.unlink(file)

def start(self, payload):
super().start(payload)
Expand Down

0 comments on commit 2487d37

Please sign in to comment.