Skip to content

Conversation

@maddieford
Copy link
Contributor

Description

Issue #

PR information

  • Ensure development PR is based on the develop branch.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made

Quality of Code and Contribution Guidelines


Distro maintenance information, if applicable

  • This is a contribution from a distro maintainer
  • The changes in this PR have been taken as a downstream patch (Note: it is not recommended to patch the agent without upstream review and approval)

uris_list = find(ga_family, "Uris")
uris = findall(uris_list, "Uri")
ga_signatures_list = find(ga_family, "VersionToSignatureMappings")
ga_signature_mappings = findall(ga_signatures_list, "GASignature")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does findall() return if it does not find the element? I could not find this in the documentation and I see some parts of the code that check against None.

for uri in uris:
family.uris.append(gettext(uri))
for ga_signature_mapping in ga_signature_mappings:
ga_signature_version = findtext(ga_signature_mapping, "Version")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

findtext() can return None

for ga_signature_mapping in ga_signature_mappings:
ga_signature_version = ga_signature_mapping.get("version")
ga_encoded_signature = ga_signature_mapping.get("encodedSignature")
agent_family.ga_version_to_signature_mapping[ga_signature_version] = ga_encoded_signature
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to check against None?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants