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:
ZyX 2014-08-29 19:17:14 +04:00
parent af10fa1e80
commit e273287eab
1 changed files with 2 additions and 2 deletions

View File

@ -31,8 +31,8 @@ def getconfigargspec(obj):
if len(arg) > 1:
defaults.append(arg[1])
requires_segment_info = getattr(obj, 'powerline_requires_segment_info', False)
requires_filesystem_watcher = getattr(obj, 'powerline_requires_filesystem_watcher', False)
requires_segment_info = hasattr(obj, 'powerline_requires_segment_info')
requires_filesystem_watcher = hasattr(obj, 'powerline_requires_filesystem_watcher')
for name, method in argspecobjs:
argspec = getargspec(method)