mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Only delete lib dir in config upgrade if exists
This commit is contained in:
parent
71e4283a2e
commit
295f27d259
@ -300,7 +300,9 @@ def process_ha_config_upgrade(hass):
|
||||
_LOGGER.info('Upgrading config directory from %s to %s', conf_version,
|
||||
__version__)
|
||||
|
||||
shutil.rmtree(hass.config.path('lib'))
|
||||
lib_path = hass.config.path('lib')
|
||||
if os.path.isdir(lib_path):
|
||||
shutil.rmtree(lib_path)
|
||||
|
||||
with open(version_path, 'wt') as outp:
|
||||
outp.write(__version__)
|
||||
|
Loading…
x
Reference in New Issue
Block a user