Skip to content

Commit

Permalink
Merge pull request #383 from RemiLehe/no_default_iteration
Browse files Browse the repository at this point in the history
Impose that user always passes iteration or t
  • Loading branch information
RemiLehe authored Aug 9, 2023
2 parents 1ebf393 + 35932fe commit 61e0721
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openpmd_viewer/openpmd_timeseries/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,9 @@ def _find_output(self, t, iteration):
"The requested iteration '%s' is not available.\nThe "
"available iterations are: \n - %s\n" % (iteration, iter_list))
else:
pass # self._current_i retains its previous value
raise OpenPMDException(
"Please pass either a time (`t`) or an "
"iteration (`iteration`).")

# Register the value in the object
self.current_t = self.t[self._current_i]
Expand Down

0 comments on commit 61e0721

Please sign in to comment.