diff --git a/thriftpy2/http.py b/thriftpy2/http.py index ae18c3a..33fd35e 100644 --- a/thriftpy2/http.py +++ b/thriftpy2/http.py @@ -125,7 +125,7 @@ def __init__(self, thttpserver = self - class RequestHander(http_server.BaseHTTPRequestHandler): + class RequestHandler(http_server.BaseHTTPRequestHandler): # Don't care about the request path. def do_POST(self): @@ -153,7 +153,7 @@ def do_POST(self): self.end_headers() self.wfile.write(otrans.getvalue()) - self.httpd = server_class(server_address, RequestHander) + self.httpd = server_class(server_address, RequestHandler) def serve(self): self.httpd.serve_forever() diff --git a/thriftpy2/parser/lexer.py b/thriftpy2/parser/lexer.py index 091c927..581cd6e 100644 --- a/thriftpy2/parser/lexer.py +++ b/thriftpy2/parser/lexer.py @@ -238,7 +238,7 @@ def t_LITERAL(t): if s[i] in maps: val += maps[s[i]] else: - msg = 'Unexcepted escaping characher: %s' % s[i] + msg = 'Unexpected escaping character: %s' % s[i] raise ThriftLexerError(msg) else: val += s[i] diff --git a/thriftpy2/parser/parser.py b/thriftpy2/parser/parser.py index a67d87f..bf6c525 100644 --- a/thriftpy2/parser/parser.py +++ b/thriftpy2/parser/parser.py @@ -169,7 +169,7 @@ def p_const_ref(p): father = child child = getattr(child, name, None) if child is None: - raise ThriftParserError('Cann\'t find name %r at line %d' + raise ThriftParserError('Can\'t find name %r at line %d' % (p[1], p.lineno(1))) if _get_ttype(child) is None or _get_ttype(father) == TType.I32: