kopia lustrzana https://github.com/OpenDroneMap/WebODM
Catch piexif.dump exceptions
rodzic
918ec48e6d
commit
bcc0f24fd5
|
@ -2,6 +2,7 @@ import logging
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import time
|
import time
|
||||||
|
import struct
|
||||||
import uuid as uuid_module
|
import uuid as uuid_module
|
||||||
from app.vendor import zipfly
|
from app.vendor import zipfly
|
||||||
|
|
||||||
|
@ -157,7 +158,7 @@ def resize_image(image_path, resize_to, done=None):
|
||||||
os.rename(resized_image_path, image_path)
|
os.rename(resized_image_path, image_path)
|
||||||
|
|
||||||
logger.info("Resized {} to {}x{}".format(image_path, resized_width, resized_height))
|
logger.info("Resized {} to {}x{}".format(image_path, resized_width, resized_height))
|
||||||
except (IOError, ValueError) as e:
|
except (IOError, ValueError, struct.error) as e:
|
||||||
logger.warning("Cannot resize {}: {}.".format(image_path, str(e)))
|
logger.warning("Cannot resize {}: {}.".format(image_path, str(e)))
|
||||||
if done is not None:
|
if done is not None:
|
||||||
done()
|
done()
|
||||||
|
|
Ładowanie…
Reference in New Issue