Have to use sys.exit on older versions of python
Merge branch 'v3/4990_v3' into branch_v3_2_4_rc