mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Update persistent deps dir version in config.py (#8479)
* Update persistent deps dir version in config.py * Update last version to remove deps dir in tests
This commit is contained in:
parent
8d1999dc12
commit
49c399c358
@ -297,8 +297,8 @@ def process_ha_config_upgrade(hass):
|
||||
_LOGGER.info("Upgrading configuration directory from %s to %s",
|
||||
conf_version, __version__)
|
||||
|
||||
if LooseVersion(conf_version) < LooseVersion('0.49'):
|
||||
# 0.49 introduced persistent deps dir.
|
||||
if LooseVersion(conf_version) < LooseVersion('0.50'):
|
||||
# 0.50 introduced persistent deps dir.
|
||||
lib_path = hass.config.path('deps')
|
||||
if os.path.isdir(lib_path):
|
||||
shutil.rmtree(lib_path)
|
||||
|
@ -260,8 +260,8 @@ class TestConfig(unittest.TestCase):
|
||||
@mock.patch('homeassistant.config.shutil')
|
||||
@mock.patch('homeassistant.config.os')
|
||||
def test_remove_lib_on_upgrade(self, mock_os, mock_shutil):
|
||||
"""Test removal of library on upgrade from before 0.49."""
|
||||
ha_version = '0.48.0'
|
||||
"""Test removal of library on upgrade from before 0.50."""
|
||||
ha_version = '0.49.0'
|
||||
mock_os.path.isdir = mock.Mock(return_value=True)
|
||||
mock_open = mock.mock_open()
|
||||
with mock.patch('homeassistant.config.open', mock_open, create=True):
|
||||
|
Loading…
x
Reference in New Issue
Block a user