Skip to content

Commit 0dacbb3

Browse files
committed
Fix version conflicts
2 parents 9206d1a + bbdbd75 commit 0dacbb3

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

hassio/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pathlib import Path
33
from ipaddress import ip_network
44

5-
HASSIO_VERSION = '0.94'
5+
HASSIO_VERSION = '0.95'
66

77
URL_HASSIO_VERSION = ('https://raw.githubusercontent.com/home-assistant/'
88
'hassio/{}/version.json')

hassio/snapshots/__init__.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,16 @@ async def do_snapshot_partial(self, name="", addons=None, folders=None,
173173
if addon and addon.is_installed:
174174
addon_list.append(addon)
175175
continue
176-
_LOGGER.warning("Add-on %s not found", addon_slug)
176+
_LOGGER.warning("Add-on %s not found/installed", addon_slug)
177177

178-
_LOGGER.info("Snapshot %s store Add-ons", snapshot.slug)
179-
await snapshot.store_addons(addon_list)
178+
if addon_list:
179+
_LOGGER.info("Snapshot %s store Add-ons", snapshot.slug)
180+
await snapshot.store_addons(addon_list)
180181

181-
# snapshot folders
182-
_LOGGER.info("Snapshot %s store folders", snapshot.slug)
183-
await snapshot.store_folders(folders)
182+
# Snapshot folders
183+
if folders:
184+
_LOGGER.info("Snapshot %s store folders", snapshot.slug)
185+
await snapshot.store_folders(folders)
184186

185187
except Exception: # pylint: disable=broad-except
186188
_LOGGER.exception("Snapshot %s error", snapshot.slug)

hassio/snapshots/snapshot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ def set_password(self, password):
151151

152152
def _encrypt_data(self, data):
153153
"""Make data secure."""
154-
if not self._key:
154+
if not self._key or data is None:
155155
return data
156156

157157
return b64encode(
158158
self._aes.encrypt(Padding.pad(data.encode(), 16))).decode()
159159

160160
def _decrypt_data(self, data):
161161
"""Make data readable."""
162-
if not self._key:
162+
if not self._key or data is None:
163163
return data
164164

165165
return Padding.unpad(

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"hassio": "0.94",
2+
"hassio": "0.95",
33
"homeassistant": "0.64.0",
44
"resinos": "1.1",
55
"resinhup": "0.3",

0 commit comments

Comments
 (0)