def _update(echomesh_instance): LOGGER.info('Pulling latest codebase from github.') directory = os.getcwd() try: os.chdir(Path.echomesh_path()) Git.run_git_commands(GIT_UPDATE) _initialize(echomesh_instance) if not INITIALIZE_ENABLED: LOGGER.info('Please restart echomesh to see the updated changes.') finally: os.chdir(directory)