diff --git a/pgloader.py b/pgloader.py index 494e57d..1d70831 100755 --- a/pgloader.py +++ b/pgloader.py @@ -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: