Skip to content

Commit

Permalink
Jack White: Replaced explicit check-and-set for default enum serializ…
Browse files Browse the repository at this point in the history
…e type with default value in dict.get()
  • Loading branch information
Jack White committed Dec 12, 2023
1 parent 19dafcc commit b78ecfc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/fprime_gds/common/loaders/xml_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,7 @@ def get_enum_type(self, enum_name, xml_obj):
# Check enum name
if enum.get(self.ENUM_TYPE_TAG) == enum_name:
# Get serialize/representation type, if present
serialize_type = enum.get(self.ENUM_SERIALIZE_TYPE_TAG)

if not serialize_type:
serialize_type = "I32"
serialize_type = enum.get(self.ENUM_SERIALIZE_TYPE_TAG, "I32")

# Go through all possible values of the enum
members = {}
Expand Down

0 comments on commit b78ecfc

Please sign in to comment.