Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for map in mappings:
if _read_etree_element(hub_element, map[0], hub, map[1], map[2]):
invalid_event_hub = False
ids = hub_element.find('./sb:PartitionIds', _etree_sb_feed_namespaces)
if ids is not None:
for id_node in ids.findall('./arrays:string', _etree_sb_feed_namespaces):
value = _get_etree_text(id_node)
if value:
hub.partition_ids.append(value)
rules_nodes = hub_element.find('./sb:AuthorizationRules', _etree_sb_feed_namespaces)
if rules_nodes is not None:
invalid_event_hub = False
for rule_node in rules_nodes.findall('./sb:AuthorizationRule', _etree_sb_feed_namespaces):
rule = AuthorizationRule()
mappings = [
('ClaimType', 'claim_type', None),
('ClaimValue', 'claim_value', None),
('ModifiedTime', 'modified_time', None),
('CreatedTime', 'created_time', None),
('KeyName', 'key_name', None),
('PrimaryKey', 'primary_key', None),
('SecondaryKey', 'secondary_key', None),
]
for map in mappings:
_read_etree_element(rule_node, map[0], rule, map[1], map[2])
rights_nodes = rule_node.find('./sb:Rights', _etree_sb_feed_namespaces)
if rights_nodes is not None: