Permalink
Browse files

cathc type exception

  • Loading branch information...
sdpython committed Jan 20, 2018
1 parent 742da6b commit eaa071d7dbc11b1395f083eba3a237fd39b57002
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/code_beatrix/art/moviepy_context.py
@@ -148,14 +148,14 @@ def clean_video(video):
* `The handle is invalid - Windows Only <https://github.com/Zulko/moviepy/issues/697>`_
"""
if isinstance(video, str):
raise TypeError("Unexpected type (string)")
if isinstance(video, (str, bool, int, float)):
raise TypeError("Unexpected type ({0})".format(type(video)))
if isinstance(video, list):
for v in video:
clean_video(v)
else:
if not hasattr(video, 'close'):
if video.reader:
if hasattr(video, 'reader') and video.reader:
video.reader.close()
video.reader = None
try:

0 comments on commit eaa071d

Please sign in to comment.