Skip to content

Commit

Permalink
Added specific exception to get_eiger_monitor_image
Browse files Browse the repository at this point in the history
  • Loading branch information
vshekar authored Feb 10, 2024
1 parent a0d9162 commit 41279bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gui/albula/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from epics import PV
from enum import Enum
import platform
from PIL import Image
from PIL import Image, UnidentifiedImageError
from io import BytesIO
import os

Expand Down Expand Up @@ -165,7 +165,7 @@ def get_eiger_monitor_image(self): # for EIGER1
img = Image.open(img_bytes)
array = numpy.array(img)
array[array == 65535] = 0
except:
except UnidentifiedImageError:
logger.error("Could not get image from EIGER")
array = numpy.zeros((3110, 3269))

Expand Down

0 comments on commit 41279bf

Please sign in to comment.