]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Raise SystemExit instead of calling goaway().
authorGuido van Rossum <guido@python.org>
Tue, 31 Dec 1991 13:15:35 +0000 (13:15 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 31 Dec 1991 13:15:35 +0000 (13:15 +0000)
Python/sysmodule.c

index ef93d2095f9710ade0eb62b48e609bd81a358048..c8460682cb0169295716bff22f705da7565d415f 100644 (file)
@@ -96,12 +96,9 @@ sys_exit(self, args)
        object *self;
        object *args;
 {
-       int sts;
-       if (!getintarg(args, &sts))
-               return NULL;
-       goaway(sts);
-       exit(sts); /* Just in case */
-       /* NOTREACHED */
+       /* Raise SystemExit so callers may catch it or clean up. */
+       err_setval(SystemExit, args);
+       return NULL;
 }
 
 static struct methodlist sys_methods[] = {