Skip to content

Commit

Permalink
[TACACS+]: Fix aaa show error without configuration (#191)
Browse files Browse the repository at this point in the history
Signed-off-by: Chenchen Qi <[email protected]>
  • Loading branch information
Liuqu authored and lguohan committed Jan 29, 2018
1 parent f07fa89 commit 71c696e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions show/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,8 @@ def aaa():
'fallback': 'True (default)'
}
}
aaa['authentication'].update(data['authentication'])
if 'authentication' in data:
aaa['authentication'].update(data['authentication'])
for row in aaa:
entry = aaa[row]
for key in entry:
Expand All @@ -832,7 +833,8 @@ def tacacs():
'passkey': '<EMPTY_STRING> (default)'
}
}
tacplus['global'].update(data['global'])
if 'global' in data:
tacplus['global'].update(data['global'])
for key in tacplus['global']:
output += ('TACPLUS global %s %s\n' % (str(key), str(tacplus['global'][key])))

Expand Down

0 comments on commit 71c696e

Please sign in to comment.