Skip to content

Commit

Permalink
Fix script load depedency
Browse files Browse the repository at this point in the history
  • Loading branch information
awarecan committed Mar 7, 2019
1 parent c91fb82 commit 1434fbb
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions homeassistant/scripts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,10 @@ def run(args: List) -> int:
hass = HomeAssistant(loop)
pkgload = PackageLoadable(hass)
for req in getattr(script, 'REQUIREMENTS', []):
try:
loop.run_until_complete(pkgload.loadable(req))
if loop.run_until_complete(pkgload.loadable(req)):
continue
except ImportError:
pass

returncode = install_package(req, **_pip_kwargs)

if not returncode:
if not install_package(req, **_pip_kwargs):
print('Aborting script, could not install dependency', req)
return 1

Expand Down

0 comments on commit 1434fbb

Please sign in to comment.