Skip to content

Commit

Permalink
fix typo usage of ThriftGrammerError
Browse files Browse the repository at this point in the history
  • Loading branch information
aisk committed Sep 15, 2023
1 parent b852fce commit 70cb987
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions thriftpy2/parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import types
from ply import lex, yacc
from .lexer import * # noqa
from .exc import ThriftParserError, ThriftGrammerError
from .exc import ThriftParserError, ThriftGrammarError
from thriftpy2._compat import urlopen, urlparse, PY3
from ..thrift import gen_init, TType, TPayload, TException

Expand All @@ -23,8 +23,8 @@

def p_error(p):
if p is None:
raise ThriftGrammerError('Grammer error at EOF')
raise ThriftGrammerError('Grammer error %r at line %d' %
raise ThriftGrammarError('Grammer error at EOF')
raise ThriftGrammarError('Grammer error %r at line %d' %
(p.value, p.lineno))


Expand Down Expand Up @@ -869,7 +869,7 @@ def _fill_in_struct(cls, fields, _gen_init=True):

for field in fields:
if field[0] in thrift_spec or field[3] in _tspec:
raise ThriftGrammerError(('\'%d:%s\' field identifier/name has '
raise ThriftGrammarError(('\'%d:%s\' field identifier/name has '
'already been used') % (field[0],
field[3]))
ttype = field[2]
Expand Down

0 comments on commit 70cb987

Please sign in to comment.