Skip to content

Commit

Permalink
Merge pull request matplotlib#12046 from anntzer/htmlwriter
Browse files Browse the repository at this point in the history
Make HTMLWriter constructor a bit more strict.
  • Loading branch information
dopplershift authored Sep 6, 2018
2 parents 5e01393 + ce95439 commit ef2cf8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions doc/api/next_api_changes/2018-09-06-AL-HTMLWriter.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The HTMLWriter constructor is more strict
`````````````````````````````````````````
It no longer normalizes unknown values of *default_mode* to 'loop', but errors
out instead.
4 changes: 2 additions & 2 deletions lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,8 +846,8 @@ def __init__(self, fps=30, codec=None, bitrate=None, extra_args=None,
self._bytes_limit *= 1024 * 1024

if self.default_mode not in ['loop', 'once', 'reflect']:
self.default_mode = 'loop'
_log.warning("unrecognized default_mode: using 'loop'")
raise ValueError(
"unrecognized default_mode {!r}".format(self.default_mode))

super().__init__(fps, codec, bitrate, extra_args, metadata)

Expand Down

0 comments on commit ef2cf8c

Please sign in to comment.