Skip to content

Commit

Permalink
Add check if self.repository_manifest exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Sep 15, 2019
1 parent 75500d8 commit af2f73d
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions custom_components/hacs/repositories/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,15 +360,16 @@ async def install(self):

await self.update_repository()

if self.repository_manifest.persistent_directory:
if os.path.exists(
f"{self.content.path.local}/{self.repository_manifest.persistent_directory}"
):
persistent_directory = Backup(
f"{self.content.path.local}/{self.repository_manifest.persistent_directory}",
"/tmp/hacs_persistent_directory/",
)
persistent_directory.create()
if self.repository_manifest:
if self.repository_manifest.persistent_directory:
if os.path.exists(
f"{self.content.path.local}/{self.repository_manifest.persistent_directory}"
):
persistent_directory = Backup(
f"{self.content.path.local}/{self.repository_manifest.persistent_directory}",
"/tmp/hacs_persistent_directory/",
)
persistent_directory.create()

if self.status.installed and not self.content.single:
backup = Backup(self.content.path.local)
Expand Down

0 comments on commit af2f73d

Please sign in to comment.