Script requirement logging, db_migrator REQUIREMENTS (#2781)

This commit is contained in:
Johann Kellerman authored and Paulus Schoutsen committed 2016-08-10 13:32:07 -07:00
1 parent 1a327d682d
commit f3376ba276
2 files changed
+15 -13

No files matched your search

+4
View File
@@ -2,6 +2,8 @@
import argparse
import importlib
import os
import sys
import logging
from typing import List
from homeassistant.config import get_default_config_dir
@@ -35,6 +37,8 @@ def run(args: List) -> int:
config_dir = extract_config_dir()
deps_dir = mount_local_lib_path(config_dir)
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
for req in getattr(script, 'REQUIREMENTS', []):
if not install_package(req, target=deps_dir):
print('Aborting scipt, could not install dependency', req)