Skip to content

Commit

Permalink
Update epanet.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariosmsk committed Apr 17, 2024
1 parent 2e4164d commit 420e66a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions epyt/epanet.py
Original file line number Diff line number Diff line change
Expand Up @@ -10378,8 +10378,14 @@ def unload(self):
safe_delete(self.TempInpFile)

cwd = os.getcwd()
tmp_files = list(filter(lambda f: os.path.isfile(os.path.join(cwd, f))
and (f.startswith("s") or f.startswith("en")) and 6 <= len(f) <= 8 and "." not in f))
files = os.listdir(cwd)
tmp_files = [
f for f in files
if os.path.isfile(os.path.join(cwd, f)) and
(f.startswith('s') or f.startswith('en')) and
6 <= len(f) <= 8 and
"." not in f
]
tmp_files_paths = [os.path.join(cwd, f) for f in tmp_files]
safe_delete(tmp_files_paths)

Expand Down

0 comments on commit 420e66a

Please sign in to comment.