Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #35 from bewing/not_string
Browse files Browse the repository at this point in the history
Don't assume device_config is a list of strings.
  • Loading branch information
dbarrosop committed Apr 3, 2017
2 parents e156c80 + c2a6f47 commit 48023cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion napalm_yang/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ def __init__(self, model, device=None, profile=None, is_config=None,
self.native = []

for n in native + device_config:
self.native.append(n.replace("\r", "")) # Parsing will be easier
if isinstance(n, basestring):
self.native.append(n.replace("\r", "")) # Parsing will be easier
else:
self.native.append(n)

if not self.native:
raise Exception("I don't have any data to operate with")
Expand Down

0 comments on commit 48023cc

Please sign in to comment.