Skip to content

Commit

Permalink
_upid_from_xml for no upid
Browse files Browse the repository at this point in the history
  • Loading branch information
futzu authored Nov 12, 2024
1 parent 816c0db commit 97a4267
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions threefive/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,16 @@ def _xml_redecode(self, seg_upid):

def _upid_from_xml(self, stuff):
if "SegmentationUpid" in stuff:
seg_upid=stuff["SegmentationUpid"]["segmentation_upid"]
if "segmentation_upid_type" in stuff["SegmentationUpid"]:
self.segmentation_upid_type= stuff["SegmentationUpid"]["segmentation_upid_type"]
self.segmentation_upid_type_name = upid_map[self.segmentation_upid_type][0]
self._xml_redecode(seg_upid)
if "segmentation_upid" not in stuff["SegmentationUpid"]:
self.segmentation_upid_type=0
self.segmentation_upid_length=0
self.segmentation_upid=''
else:
seg_upid=stuff["SegmentationUpid"]["segmentation_upid"]
if "segmentation_upid_type" in stuff["SegmentationUpid"]:
self.segmentation_upid_type= stuff["SegmentationUpid"]["segmentation_upid_type"]
self.segmentation_upid_type_name = upid_map[self.segmentation_upid_type][0]
self._xml_redecode(seg_upid)

def from_xml(self, stuff):
"""
Expand Down

0 comments on commit 97a4267

Please sign in to comment.