Skip to content

Commit

Permalink
Fixed the confirm prompt to be before stop service (sonic-net#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
prsunny authored and lguohan committed Jul 27, 2018
1 parent 747d5c3 commit 865caed
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 @@ -203,10 +203,10 @@ def load(filename, yes):
@click.argument('filename', default='/etc/sonic/config_db.json', type=click.Path(exists=True))
def reload(filename, yes):
"""Clear current configuration and import a previous saved config DB dump file."""
#Stop services before config push
_stop_services()
if not yes:
click.confirm('Clear current config and reload config from the file %s?' % filename, abort=True)
#Stop services before config push
_stop_services()
config_db = ConfigDBConnector()
config_db.connect()
client = config_db.redis_clients[config_db.CONFIG_DB]
Expand Down

0 comments on commit 865caed

Please sign in to comment.