mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 12:12:53 +01:00
IRCParser: show an error when using "command --help" instead of silently outputting help text in the console
This commit is contained in:
parent
76d74ab9bb
commit
ca93d1ad70
7
utils.py
7
utils.py
@ -558,8 +558,13 @@ class IRCParser(argparse.ArgumentParser):
|
|||||||
Wrapper around argparse.ArgumentParser, without quitting on usage errors.
|
Wrapper around argparse.ArgumentParser, without quitting on usage errors.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def error(self, message):
|
def print_help(self, *args, **kwargs):
|
||||||
|
# XXX: find a way to somehow route this through IRC
|
||||||
|
raise InvalidArgumentsError("Use help <commandname> to receive help for PyLink commands.")
|
||||||
|
|
||||||
|
def error(self, message, *args, **kwargs):
|
||||||
raise InvalidArgumentsError(message)
|
raise InvalidArgumentsError(message)
|
||||||
|
_print_message = error # XXX: ugly
|
||||||
|
|
||||||
def exit(self, *args):
|
def exit(self, *args):
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user