More fault tolerant server image resize

pull/663/head
Piero Toffanin 2019-05-16 12:27:04 -04:00
rodzic f96b3ea8a2
commit c172196ba7
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -116,7 +116,7 @@ def resize_image(image_path, resize_to, done=None):
os.rename(resized_image_path, image_path)
logger.info("Resized {} to {}x{}".format(image_path, resized_width, resized_height))
except IOError as e:
except (IOError, ValueError) as e:
logger.warning("Cannot resize {}: {}.".format(image_path, str(e)))
if done is not None:
done()