From: Calin Crisan Date: Sat, 18 Jan 2014 18:21:47 +0000 (+0200) Subject: "stream is closed" IOError is now caught for local current picture X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=c2a7b0c0df26cfed1a17904463502069f9e4b332;p=motioneye-debian "stream is closed" IOError is now caught for local current picture requests --- diff --git a/src/handlers.py b/src/handlers.py index 4117c2f..09e4dcb 100644 --- a/src/handlers.py +++ b/src/handlers.py @@ -546,8 +546,12 @@ class PictureHandler(BaseHandler): if sequence and picture: mediafiles.set_picture_cache(camera_id, sequence, width, picture) - self.finish(picture) + try: + self.finish(picture) + except IOError as e: + logging.warning('could not write picture as response: %(msg)s' % {'msg': unicode(e)}) + else: def on_response(picture): if sequence and picture: