зеркало из https://github.com/mozilla/stoneridge.git
Make help work in stoneridge programs again
Automagically parsing out the log information had screwed up help output from programs when -h or --help was passed in (but not any other way) because the ArgumentParser for getting log filename was intercepting that. By having it not generate its own help, we fix that issue.
This commit is contained in:
Родитель
709f4b8d19
Коммит
ed3609f125
|
@ -42,7 +42,7 @@ CLIENT_QUEUES = {
|
|||
|
||||
# Logging configuration
|
||||
LOG_FMT = '%(asctime)s %(pathname)s:%(lineno)d %(levelname)s: %(message)s'
|
||||
_parser = argparse.ArgumentParser()
|
||||
_parser = argparse.ArgumentParser(add_help=False)
|
||||
_parser.add_argument('--log')
|
||||
_args, _ = _parser.parse_known_args()
|
||||
if _args.log:
|
||||
|
|
Загрузка…
Ссылка в новой задаче