Procházet zdrojové kódy

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

Taddeus Kroes před 5 roky
rodič
revize
9117b76769
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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='')