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:
Trenton Holmes 2024-01-05 20:07:31 -08:00 committed by Trenton H
parent a82e3771ae
commit 569beba348

View File

@ -90,6 +90,9 @@ class BarcodeReader:
"""
asn = None
if not self.supported_mime_type:
return None
# Ensure the barcodes have been read
self.detect()
@ -215,7 +218,7 @@ class BarcodeReader:
# This file is really borked, allow the consumption to continue
# but it may fail further on
except Exception as e: # pragma: no cover
logger.warning(
logger.exception(
f"Exception during barcode scanning: {e}",
)