Explorar el Código

Print memento traceback on stdout

John Tyree hace 11 años
padre
commit
9722b48989
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      memento.py

+ 2 - 2
memento.py

@@ -91,7 +91,7 @@ if __name__ == '__main__':
         n.DoStuff()
     except:
         print('-> doing stuff failed!')
-        import traceback
-        traceback.print_exc(0)
+        import sys, traceback
+        traceback.print_exc(file=sys.stdout)
         pass
     print(n)