Skip to content

Commit

Permalink
Modified EventReport.stat to allow for paths that are not found on th…
Browse files Browse the repository at this point in the history
…e local machine.
  • Loading branch information
gbrunin committed Dec 1, 2023
1 parent 9802332 commit 3e58a88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion abipy/flowtk/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,10 @@ def __init__(self, filename: str, events=None):
events: List of Event objects
"""
self.filename = os.path.abspath(filename)
self.stat = os.stat(self.filename)
try:
self.stat = os.stat(self.filename)
except FileNotFoundError:
self.stat = None
self.start_datetime, self.end_datetime = None, None

self._events = []
Expand Down

0 comments on commit 3e58a88

Please sign in to comment.