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

Commit

Permalink
Use the overwrite arg
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceaulinic committed Jun 14, 2017
1 parent a5d792c commit e3b012c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions napalm_yang/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ def load_dict(self, data, overwrite=False):
>>> print(200, config.vlans.vlan[200].config.name)
... (200, u'dev')
"""
if overwrite:
self._elements = {}
for k, v in data.items():
if k not in self._elements.keys():
raise AttributeError("Model {} is not loaded".format(k))
Expand Down

0 comments on commit e3b012c

Please sign in to comment.