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:
Paulus Schoutsen 2017-07-19 22:59:21 -07:00 committed by GitHub
parent 8d1999dc12
commit 49c399c358
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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):