Skip to content

Commit

Permalink
[Python] SetupPayload export version property. (#27959)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianfeng-yang authored and pull[bot] committed Aug 17, 2023
1 parent 936a9ce commit 1076402
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controller/python/chip/setup_payload/setup_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ def __InitNativeFunctions(self, chipLib):
# Getters from parsed contents.
# Prefer using the methods below to access setup payload information once parse.

@property
def version(self) -> int:
return int(self.attributes.get("Version", "0"))

@property
def vendor_id(self) -> int:
return int(self.attributes.get("VendorID", "0"))
Expand Down

0 comments on commit 1076402

Please sign in to comment.