diff --git a/src/calibre/ebooks/rtf2xml/inline.py b/src/calibre/ebooks/rtf2xml/inline.py index 83c383fa1f..8949cf35ad 100755 --- a/src/calibre/ebooks/rtf2xml/inline.py +++ b/src/calibre/ebooks/rtf2xml/inline.py @@ -143,7 +143,7 @@ class Inline: action = self.__default_dict.get(self.__token_info) if action: action(line) - self.__write_obj.write(line) + self.__write_obj.write(line) def __found_open_bracket_func(self, line): """ @@ -410,7 +410,7 @@ class Inline: self.__token_info = line[:16] self.__set_list_func(line) action = self.__state_dict.get(self.__state) - if action == None: + if action is None: sys.stderr.write(_('No matching state in module inline_for_lists.py\n')) sys.stderr.write(self.__state + '\n') action(line) diff --git a/src/calibre/ebooks/rtf2xml/process_tokens.py b/src/calibre/ebooks/rtf2xml/process_tokens.py index 9f26bb295b..1033ebc583 100755 --- a/src/calibre/ebooks/rtf2xml/process_tokens.py +++ b/src/calibre/ebooks/rtf2xml/process_tokens.py @@ -52,7 +52,7 @@ class ProcessTokens: self.__return_code = 0 self.dict_token={ # unicode - 'mshex' : ('nu', '__________', self.__ms_hex_func), + 'mshex' : ('nu', '__________', self.__ms_hex_func), # brackets '{' : ('nu', '{', self.ob_func), '}' : ('nu', '}', self.cb_func),