From da945a9c1ad6fb2754f3f98e055388f3187b0589 Mon Sep 17 00:00:00 2001 From: Kazuki Suzuki Przyborowski Date: Sat, 16 Nov 2024 16:41:17 -0600 Subject: [PATCH] Update prepgmagick.py --- upcean/predraw/prepgmagick.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upcean/predraw/prepgmagick.py b/upcean/predraw/prepgmagick.py index ab72ace2..25d30ce9 100644 --- a/upcean/predraw/prepgmagick.py +++ b/upcean/predraw/prepgmagick.py @@ -245,7 +245,7 @@ def save_to_file(inimage, outfile, outfileext, imgcomment="barcode"): upc_img.attribute('comment', imgcomment) # Save image try: - if isinstance(outfile, BytesIO): + if isinstance(outfile, file) or isinstance(outfile, IOBase): blob = pgmagick.Blob() upc_img.write(blob) outfile.write(blob.data)