mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
use real parser name in error message
This commit is contained in:
@ -106,7 +106,7 @@ def about_jc():
|
||||
}
|
||||
parser_list.append(parser_entry)
|
||||
|
||||
result = {
|
||||
return {
|
||||
'name': __name__,
|
||||
'version': info.version,
|
||||
'description': info.description,
|
||||
@ -115,8 +115,6 @@ def about_jc():
|
||||
'parsers': parser_list
|
||||
}
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def helptext(message):
|
||||
parsers_string = parsers_text()
|
||||
@ -197,7 +195,7 @@ def main():
|
||||
found = True
|
||||
break
|
||||
except:
|
||||
parser_name = arg.lstrip('--')
|
||||
parser_name = parser_map[arg].__name__.split('.')[-1]
|
||||
jc.utils.error_message(f'{parser_name} parser could not parse the input data. Did you use the correct parser?\n For details use the -d option.')
|
||||
exit(1)
|
||||
|
||||
|
Reference in New Issue
Block a user