Check for presence of powerline_requires_* attributes
In powerline.lint.inspect their value is checked, while in other place `hasattr` is used. This commit removes this inconsistency.
This commit is contained in:
parent
af10fa1e80
commit
e273287eab
|
@ -31,8 +31,8 @@ def getconfigargspec(obj):
|
||||||
if len(arg) > 1:
|
if len(arg) > 1:
|
||||||
defaults.append(arg[1])
|
defaults.append(arg[1])
|
||||||
|
|
||||||
requires_segment_info = getattr(obj, 'powerline_requires_segment_info', False)
|
requires_segment_info = hasattr(obj, 'powerline_requires_segment_info')
|
||||||
requires_filesystem_watcher = getattr(obj, 'powerline_requires_filesystem_watcher', False)
|
requires_filesystem_watcher = hasattr(obj, 'powerline_requires_filesystem_watcher')
|
||||||
|
|
||||||
for name, method in argspecobjs:
|
for name, method in argspecobjs:
|
||||||
argspec = getargspec(method)
|
argspec = getargspec(method)
|
||||||
|
|
Loading…
Reference in New Issue