Skip to content

Commit

Permalink
Modified code based on Review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
ramachandrareddygaddam committed May 12, 2019
1 parent a86d393 commit 6273cd1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sonic-config-engine/sonic-cfggen
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ def main():
print(template.render(data))

if args.var_json != None:
try :
if not data.has_key(args.var_json):
print("{}")
else:
print(json.dumps(FormatConverter.to_serialized(data[args.var_json]), indent=4, cls=minigraph_encoder))
except KeyError:
return

if args.write_to_db:
configdb = ConfigDBConnector(**db_kwargs)
Expand Down

0 comments on commit 6273cd1

Please sign in to comment.