This reverts commit 81cbdb6c8c and adds ignoring of the SystemExit exception because of Python 2.4.
81cbdb6c8c