diff --git a/examples/exit.py b/examples/exit.py index 75fdc01..9f6b6b2 100644 --- a/examples/exit.py +++ b/examples/exit.py @@ -1,11 +1,9 @@ -import sys - from httpout import __server__ print('Hello, ', end='') if __server__['QUERY_STRING']: - sys.exit(__server__['QUERY_STRING'] + '!\n') + exit(__server__['QUERY_STRING'] + '!\n') -sys.exit(0) +exit(0) diff --git a/httpout/__init__.py b/httpout/__init__.py index 16b3d44..a005d71 100644 --- a/httpout/__init__.py +++ b/httpout/__init__.py @@ -1,6 +1,6 @@ # Copyright (c) 2024 nggit -__version__ = '0.0.61' +__version__ = '0.0.62' __all__ = ('HTTPOut',) from .httpout import HTTPOut # noqa: E402 diff --git a/httpout/httpout.py b/httpout/httpout.py index 8ab8d7a..6c2f409 100644 --- a/httpout/httpout.py +++ b/httpout/httpout.py @@ -148,6 +148,7 @@ def ho_import(name, globals=None, locals=None, fromlist=(), level=0): builtins.__import__ = ho_import builtins.__globals__ = worker['__globals__'] + builtins.exit = sys.exit g.wait = wait g.caches = {}