Skip to content

Commit f5517b9

Browse files
author
David Erb
committed
uses ValueError and VisitNotFound
1 parent 0a839f4 commit f5517b9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/rockingester_lib/collectors/direct_poll.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from dls_utilpack.callsign import callsign
99
from dls_utilpack.explain import explain2
1010
from dls_utilpack.require import require
11-
from dls_utilpack.visit import get_xchem_directory
11+
from dls_utilpack.visit import VisitNotFound, get_xchem_directory
1212
from PIL import Image
1313

1414
# Dataface client context.
@@ -246,15 +246,20 @@ async def scrape_plates_directory(
246246
self.__visits_directory, crystal_plate_model.visit
247247
)
248248
)
249+
except ValueError:
250+
pass
251+
except VisitNotFound:
252+
pass
249253

254+
if visit_directory is not None:
250255
await self.scrape_plate_directory(
251256
plates_directory / plate_name,
252257
crystal_plate_model,
253258
visit_directory,
254259
)
255260
# This barcode is in the database, but the visit name
256261
# is not properly formatted or the visit directory doesn't exist.
257-
except Exception as exception:
262+
else:
258263
# For now, don't move these out of SubwellImages since Texrank expects them here.
259264
# TODO: Find out how to disable Texrank jobs from running at all.
260265
# await self.__move_without_ingesting(

0 commit comments

Comments
 (0)