Skip to content

Commit

Permalink
Update package/MDAnalysis/analysis/base.py
Browse files Browse the repository at this point in the history
Co-authored-by: Oliver Beckstein <orbeckst@gmail.com>
  • Loading branch information
marinegor and orbeckst authored Aug 16, 2024
1 parent ff4d0c2 commit f6672ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package/MDAnalysis/analysis/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,10 @@ def run(
backend = "serial" if backend is None else backend

progressbar_kwargs = {} if progressbar_kwargs is None else progressbar_kwargs
if (progressbar_kwargs or verbose) and backend != "serial":
if ((progressbar_kwargs or verbose) and
not (backend == "serial" or
issubclass(backend, BackendSerial) or
isinstance(backend, BackendSerial))):
raise ValueError("Can not display progressbar with non-serial backend")

# if number of workers not specified, try getting the number from
Expand Down

0 comments on commit f6672ff

Please sign in to comment.