From 29961fc069eb40e5ff87360b63fd2a5523932d49 Mon Sep 17 00:00:00 2001 From: Menno Smits Date: Tue, 1 Jul 2014 00:01:44 +1200 Subject: [PATCH] Fix lexer bug with handling of invalid escaping --- imapclient/response_lexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imapclient/response_lexer.py b/imapclient/response_lexer.py index 9432e8c..25e7154 100644 --- a/imapclient/response_lexer.py +++ b/imapclient/response_lexer.py @@ -67,7 +67,7 @@ class Lexer(object): escaper = nextchar nextchar = six.next(stream_i) if nextchar != escaper and nextchar != end_char: - token += escaper.decode + nextchar = escaper + nextchar # Don't touch invalid escaping elif nextchar == end_char: break token += nextchar -- 2.43.0