Skip to content

Commit

Permalink
Update to make config load/reload backward compatible. (sonic-net#1115)
Browse files Browse the repository at this point in the history
Update to handle this style of invoking config reload command "sudo config reload /dev/stdin -y"
REF: https://github.com/Azure/SONiC/wiki/L2-Switch-mode
  • Loading branch information
judyjoseph authored Sep 15, 2020
1 parent aa27dd9 commit 8592d08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ def load(filename, yes):
file = "/etc/sonic/config_db{}.json".format(inst)

# if any of the config files in linux host OR namespace is not present, return
if not os.path.isfile(file):
if not os.path.exists(file):
click.echo("The config_db file {} doesn't exist".format(file))
return

Expand Down Expand Up @@ -1064,7 +1064,7 @@ def reload(db, filename, yes, load_sysinfo, no_service_restart):
file = "/etc/sonic/config_db{}.json".format(inst)

# Check the file exists before proceeding.
if not os.path.isfile(file):
if not os.path.exists(file):
click.echo("The config_db file {} doesn't exist".format(file))
continue

Expand Down

0 comments on commit 8592d08

Please sign in to comment.