Bugfix git clone (#152)

Add an optional extended description…
This commit is contained in:
Pascal Vizeli 2017-08-15 08:55:55 +02:00 committed by GitHub
parent 021946e181
commit f00b21dc28

View File

@ -1,6 +1,7 @@
"""Init file for HassIO addons git.""" """Init file for HassIO addons git."""
import asyncio import asyncio
import logging import logging
import functools as ft
from pathlib import Path from pathlib import Path
import shutil import shutil
@ -48,8 +49,9 @@ class GitRepo(object):
try: try:
_LOGGER.info("Clone addon %s repository", self.url) _LOGGER.info("Clone addon %s repository", self.url)
self.repo = await self.loop.run_in_executor( self.repo = await self.loop.run_in_executor(
None, git.Repo.clone_from, self.url, str(self.path), None, ft.partial(
recursive=True) git.Repo.clone_from, self.url, str(self.path),
recursive=True))
except (git.InvalidGitRepositoryError, git.NoSuchPathError, except (git.InvalidGitRepositoryError, git.NoSuchPathError,
git.GitCommandError) as err: git.GitCommandError) as err: