Parcourir la source

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

Taddeus Kroes il y a 5 ans
Parent
commit
9117b76769
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  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='')