mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-11-25 20:11:40 +01:00
Return level name, not level itself (make consistent with setter).
This commit is contained in:
parent
301a27ae27
commit
4b456dd01e
@ -100,7 +100,9 @@ class Output(object):
|
||||
|
||||
@property
|
||||
def minlevel(self):
|
||||
return self.__minlevel
|
||||
if self.__minlevel < len(self.LEVELS):
|
||||
return self.LEVELS[self.__minlevel]
|
||||
return 'unknown'
|
||||
|
||||
@minlevel.setter
|
||||
def minlevel(self, name):
|
||||
@ -122,7 +124,7 @@ class Output(object):
|
||||
def __getattr__(self, name):
|
||||
if name == 'head' and self.batch:
|
||||
return lambda x: None
|
||||
if not self.getlevel(name) >= self.minlevel:
|
||||
if not self.getlevel(name) >= self.__minlevel:
|
||||
return lambda x: None
|
||||
if self.colors and os.name == 'posix' and name in self.COLORS:
|
||||
color = u'\033[0;{0}m'.format(self.COLORS[name])
|
||||
|
Loading…
Reference in New Issue
Block a user