Skip to content

Commit

Permalink
fix prev. delta: jinja does not have isinstance
Browse files Browse the repository at this point in the history
  • Loading branch information
hwhesselink committed Mar 6, 2021
1 parent 6942101 commit ceb9cea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions snmp/macros.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
{%- macro v12c_communities(mode, proto='') -%}
{% set communities = conf.get(mode+'communities'+proto, []) -%}
{%- for community in communities %}
{%- if isinstance(communities, dict) and communities.get(community, {}) is mapping %}
{%- if communities is mapping and communities.get(community, {}) is mapping %}
{%- set source = communities.get(community).get('source', '') %}
{%- set view = communities.get(community).get('view', None) %}
{%- else %}
{%- set source = '' %}
{%- set view = '' %}
{%- endif %}
{%- if not isinstance(source, (tuple, list)) %}
{%- if source is not sequence or source is mapping or source is string %}
{%- set source = [source] %}
{%- endif %}
{%- for src in source -%}
Expand Down

0 comments on commit ceb9cea

Please sign in to comment.