mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 10:31:02 +02:00
Handle SystemExit separately from Exception (python <= 2.4)
This commit is contained in:
parent
b323952e63
commit
82b2667ef7
@ -771,6 +771,12 @@ def load_data():
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
ret = load_data()
|
||||
|
||||
# SystemExit inherits from Exception in python < 2.5, so we have to
|
||||
# handle it separately.
|
||||
except SystemExit, e:
|
||||
sys.exit(e.code)
|
||||
|
||||
except Exception, e:
|
||||
from pgloader.options import DEBUG
|
||||
if DEBUG:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user