File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/murfey/client/contexts Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -235,9 +235,14 @@ def post_transfer(
235235 for_parsing = xml .read ()
236236 batch_xml = xmltodict .parse (for_parsing )
237237
238- for batch_position in batch_xml ["BatchPositionsList" ]["BatchPositions" ][
238+ batch_positions_list = batch_xml ["BatchPositionsList" ]["BatchPositions" ][
239239 "BatchPositionParameters"
240- ]:
240+ ]
241+ if isinstance (batch_positions_list , dict ):
242+ # Case of a single batch
243+ batch_positions_list = [batch_positions_list ]
244+
245+ for batch_position in batch_positions_list :
241246 batch_name = batch_position ["Name" ]
242247 search_map_name = batch_position ["PositionOnTileSet" ]["TileSetName" ]
243248 batch_stage_location_x = float (
@@ -271,7 +276,7 @@ def post_transfer(
271276 )
272277
273278 # Beamshifts
274- if batch_position [ "AdditionalExposureTemplateAreas" ] :
279+ if batch_position . get ( "AdditionalExposureTemplateAreas" ) :
275280 beamshifts = batch_position ["AdditionalExposureTemplateAreas" ][
276281 "ExposureTemplateAreaParameters"
277282 ]
You can’t perform that action at this time.
0 commit comments