have strategyresolver use user_data_dir

This commit is contained in:
Matthias 2019-07-25 07:16:52 +02:00
parent 432b106d58
commit 9de8d7276e
2 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ class IResolver(object):
if not str(entry).endswith('.py'):
logger.debug('Ignoring %s', entry)
continue
module_path = Path.resolve(directory.joinpath(entry))
module_path = entry.resolve()
obj = IResolver._get_valid_object(
object_type, module_path, object_name
)
@ -84,6 +84,6 @@ class IResolver(object):
f"from '{module_path}'...")
return module
except FileNotFoundError:
logger.warning('Path "%s" does not exist.', _path.relative_to(Path.cwd()))
logger.warning('Path "%s" does not exist.', _path.resolve())
return None

View File

@ -123,7 +123,7 @@ class StrategyResolver(IResolver):
current_path = Path(__file__).parent.parent.joinpath('strategy').resolve()
abs_paths = [
Path.cwd().joinpath('user_data/strategies'),
config['user_data_dir'].joinpath('strategies'),
current_path,
]