add Main.info(), Main.done(), Main.warn(), Main.fail() log aliases
This commit is contained in:
parent
396ae4e49d
commit
3f6b7cd24e
1 changed files with 13 additions and 1 deletions
14
over/app.py
14
over/app.py
|
@ -219,7 +219,7 @@ def expand_group(token, options):
|
|||
|
||||
options_by_abbr = {option.abbr: option for option in options.values() if option.abbr}
|
||||
|
||||
group_positive = token[0] is "+"
|
||||
group_positive = token[0] == "+"
|
||||
|
||||
for abbr in token[1:]:
|
||||
try:
|
||||
|
@ -443,6 +443,18 @@ class Main:
|
|||
def __repr__(self):
|
||||
return 'over.app.Main(name="%s")' %(self.name)
|
||||
|
||||
def info(self, *args, **kwargs):
|
||||
self.print(*args, **kwargs)
|
||||
|
||||
def done(self, *args, **kwargs):
|
||||
self.print(*args, tag=self.print.tl.done, **kwargs)
|
||||
|
||||
def warn(self, *args, **kwargs):
|
||||
self.print(*args, tag=self.print.tl.warn, **kwargs)
|
||||
|
||||
def fail(self, *args, **kwargs):
|
||||
self.print(*args, tag=self.print.tl.fail, **kwargs)
|
||||
|
||||
def exit(self, rv=0):
|
||||
"""
|
||||
Terminates the program and returns `rv`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue