exit() is not sys.exit()

Bug #1314179 reported by Vincent Ladeuil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu CI Engine
Fix Released
High
Vincent Ladeuil

Bug Description

There is a difference between exit() and sys.exit(), the former closes sys.stdin (see site.py) which makes it impossible to debug tests that call it. This is aggravated by the fact that if one test calls it, sys.stdin is closed so any other attempt to debug a different test are screwed.

There is no other difference... both raise SystemExit otherwise.

https://docs.python.org/2/library/constants.html?highlight=exit#constants-added-by-the-site-module is clear:

"They are useful for the interactive interpreter shell and should not be used in programs."

I'll have a fix shortly available.

Tags: airline

Related branches

Vincent Ladeuil (vila)
Changed in uci-engine:
status: In Progress → Fix Committed
Vincent Ladeuil (vila)
Changed in uci-engine:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.