Skip to content

Commit

Permalink
better check for existing prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
travisbcotton committed Apr 4, 2024
1 parent afa93be commit e39bd57
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dnsmasq-dhcpd-dynamic/smd.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ def getSMD(url):
return data

def getNID(c_data, xname):
node_prefix = os.environ['node_prefix']
if not node_prefix:
if 'node_prefix' in os.environ:
node_prefix = os.environ['node_prefix']
else:
node_prefix="nid"
for c in c_data:
if xname == c['ID']:
Expand Down

0 comments on commit e39bd57

Please sign in to comment.