Merge remote-tracking branch 'zyx-i/powerline-list-expanduser' into develop
This commit is contained in:
commit
bb6c959313
|
@ -1,3 +1,5 @@
|
||||||
|
# vim:fileencoding=utf-8:noet
|
||||||
|
|
||||||
from powerline.lint.markedjson import load
|
from powerline.lint.markedjson import load
|
||||||
from powerline import find_config_file, Powerline
|
from powerline import find_config_file, Powerline
|
||||||
from powerline.lib.config import load_json_config
|
from powerline.lib.config import load_json_config
|
||||||
|
@ -436,9 +438,9 @@ main_spec = (Spec(
|
||||||
term_truecolor=Spec().type(bool).optional(),
|
term_truecolor=Spec().type(bool).optional(),
|
||||||
# Python is capable of loading from zip archives. Thus checking path
|
# Python is capable of loading from zip archives. Thus checking path
|
||||||
# only for existence of the path, not for it being a directory
|
# only for existence of the path, not for it being a directory
|
||||||
paths=Spec().list((lambda value, *args: (True, True, not os.path.exists(value.value))),
|
paths=Spec().list((lambda value, *args: (True, True, not os.path.exists(os.path.expanduser(value.value)))),
|
||||||
lambda value: 'path does not exist: {0}'.format(value)).optional(),
|
lambda value: 'path does not exist: {0}'.format(value)).optional(),
|
||||||
log_file=Spec().type(str).func(lambda value, *args: (True, True, not os.path.isdir(os.path.dirname(value))),
|
log_file=Spec().type(str).func(lambda value, *args: (True, True, not os.path.isdir(os.path.dirname(os.path.expanduser(value)))),
|
||||||
lambda value: 'directory does not exist: {0}'.format(os.path.dirname(value))).optional(),
|
lambda value: 'directory does not exist: {0}'.format(os.path.dirname(value))).optional(),
|
||||||
log_level=Spec().re('^[A-Z]+$').func(lambda value, *args: (True, True, not hasattr(logging, value)),
|
log_level=Spec().re('^[A-Z]+$').func(lambda value, *args: (True, True, not hasattr(logging, value)),
|
||||||
lambda value: 'unknown debugging level {0}'.format(value)).optional(),
|
lambda value: 'unknown debugging level {0}'.format(value)).optional(),
|
||||||
|
|
Loading…
Reference in New Issue