Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _convert_etree_element_to_event_hub(entry_element):
hub = EventHub()
invalid_event_hub = True
# get node for each attribute in EventHub class, if nothing found then the
# response is not valid xml for EventHub.
hub_element = entry_element.find('./atom:content/sb:EventHubDescription', _etree_sb_feed_namespaces)
if hub_element is not None:
mappings = [
('SizeInBytes', 'size_in_bytes', int),
('MessageRetentionInDays', 'message_retention_in_days', int),
('Status', 'status', None),
('UserMetadata', 'user_metadata', None),
('PartitionCount', 'partition_count', int),
('EntityAvailableStatus', 'entity_available_status', None),
]