소스 검색

Make sure parsing errors result in skipping the frame when assertions are disabled

Taddeus Kroes 5 년 전
부모
커밋
9117b76769
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      bot.py

+ 2 - 1
bot.py

@@ -56,7 +56,8 @@ if __name__ == '__main__':
                 vprint_state(state)
                 vprint()
 
-                assert state.exa is not None
+                if state.exa is None:
+                    raise AssertionError
 
             except (TypeError, AssertionError):
                 vprint('\rerror during parsing, wait for a bit...', end='')