Ignore empty elements in POWERLINE_CONFIG_PATHS

Ref #1201
This commit is contained in:
ZyX 2015-01-07 04:27:40 +03:00
parent 972a55afc1
commit df5f5e9a7d
2 changed files with 3 additions and 2 deletions

View File

@ -144,7 +144,8 @@ above rules:
Additionally one environment variable is a usual *colon*-separated list of
directories: ``POWERLINE_CONFIG_PATHS``. This one defines paths which will be
searched for configuration.
searched for configuration. Empty paths in ``POWERLINE_CONFIG_PATHS`` are
ignored.
.. note::
Overrides from environment variables have lower priority then

View File

@ -49,7 +49,7 @@ def finish_args(environ, args):
if args.renderer_arg:
args.renderer_arg = mergeargs((parsedotval(v) for v in args.renderer_arg), remove=True)
args.config_path = (
environ.get('POWERLINE_CONFIG_PATHS', '').split(':')
[path for path in environ.get('POWERLINE_CONFIG_PATHS', '').split(':') if path]
+ (args.config_path or [])
)
return args