8000 Merge pull request #12046 from anntzer/htmlwriter · matplotlib/matplotlib@ef2cf8c · GitHub
[go: up one dir, main page]

Skip to content

Commit ef2cf8c

Browse files
authored
Merge pull request #12046 from anntzer/htmlwriter
Make HTMLWriter constructor a bit more strict.
2 parents 5e01393 + ce95439 commit ef2cf8c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The HTMLWriter constructor is more strict
2+
`````````````````````````````````````````
3+
It no longer normalizes unknown values of *default_mode* to 'loop', but errors
4+
out instead.

lib/matplotlib/animation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,8 +846,8 @@ def __init__(self, fps=30, codec=None, bitrate=None, extra_args=None,
846846
self._bytes_limit *= 1024 * 1024
847847

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

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

0 commit comments

Comments
 (0)
0