Fixes a random crash in the barcode ASN reading so it doesn't try to access a not created temp dir
This commit is contained in:
parent
a82e3771ae
commit
569beba348
@ -90,6 +90,9 @@ class BarcodeReader:
|
|||||||
"""
|
"""
|
||||||
asn = None
|
asn = None
|
||||||
|
|
||||||
|
if not self.supported_mime_type:
|
||||||
|
return None
|
||||||
|
|
||||||
# Ensure the barcodes have been read
|
# Ensure the barcodes have been read
|
||||||
self.detect()
|
self.detect()
|
||||||
|
|
||||||
@ -215,7 +218,7 @@ class BarcodeReader:
|
|||||||
# This file is really borked, allow the consumption to continue
|
# This file is really borked, allow the consumption to continue
|
||||||
# but it may fail further on
|
# but it may fail further on
|
||||||
except Exception as e: # pragma: no cover
|
except Exception as e: # pragma: no cover
|
||||||
logger.warning(
|
logger.exception(
|
||||||
f"Exception during barcode scanning: {e}",
|
f"Exception during barcode scanning: {e}",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user