Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exception handling to avoid crash when comparing types #7

Merged
merged 1 commit into from
Dec 25, 2019

Conversation

kbreit
Copy link
Collaborator

@kbreit kbreit commented Dec 24, 2019

is_update_required() didn't handle exceptions if the types were different. This used to be handled by the type comparison, but since that is removed, this is needed.

This pull request fixes the corner case where the proposed object isn't a dict so .items() would crash. The AttributeError exception is now handled.

Fixes #6

  • meraki_admin.py
  • meraki_config_template.py
  • meraki_content_filtering.py
  • meraki_device.py
  • meraki_firewalled_services.py
  • meraki_malware.py
  • meraki_mr_l3_firewall.py
  • meraki_mx_l3_firewall.py
  • meraki_mx_l7_firewall.py
  • meraki_nat.py
  • meraki_network.py
  • meraki_organization.py
  • meraki_snmp.py
  • meraki_ssid.py
  • meraki_static_route.py
  • meraki_switchport.py
  • meraki_syslog.py
  • meraki_vlan.py
  • meraki_webhook.py

@kbreit kbreit self-assigned this Dec 24, 2019
@kbreit kbreit added the bug Something isn't working label Dec 24, 2019
@kbreit kbreit added this to In progress in v0.1.0 Status Dec 24, 2019
@kbreit kbreit merged commit c348722 into CiscoDevNet:master Dec 25, 2019
v0.1.0 Status automation moved this from In progress to Done Dec 25, 2019
@kbreit kbreit deleted the bugfix/6 branch December 25, 2019 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
v0.1.0 Status
  
Done
Development

Successfully merging this pull request may close these issues.

is_update_required() should handle different types to avoid traceback
1 participant