Skip to content

Commit

Permalink
fix: closing the backends does not open them on the process
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanPedroGHM committed Sep 21, 2023
1 parent 75bfca1 commit 13f95b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions perun/perun.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ def backends(self) -> Dict[str, Backend]:

def _close_backends(self):
"""Close available backends."""
for backend in self.backends.values():
backend.close()
if self._backends:
for backend in self._backends.values():
backend.close()

@property
def host_rank(self) -> Dict[str, List[int]]:
Expand Down

0 comments on commit 13f95b3

Please sign in to comment.