server/images: handle resizing errors
This commit is contained in:
parent
a1b762c65f
commit
3c138685ea
1 changed files with 4 additions and 2 deletions
|
@ -50,8 +50,10 @@ class Image:
|
||||||
'-ss',
|
'-ss',
|
||||||
'%d' % math.floor(duration * 0.3),
|
'%d' % math.floor(duration * 0.3),
|
||||||
] + cli
|
] + cli
|
||||||
self.content = self._execute(cli)
|
content = self._execute(cli)
|
||||||
assert self.content
|
if not content:
|
||||||
|
raise errors.ProcessingError('Error while resizing image.')
|
||||||
|
self.content = content
|
||||||
self._reload_info()
|
self._reload_info()
|
||||||
|
|
||||||
def to_png(self) -> bytes:
|
def to_png(self) -> bytes:
|
||||||
|
|
Loading…
Reference in a new issue