Commit 66a401d2 authored by Denis Bilenko's avatar Denis Bilenko

gevent.monkey: when run as a script, set __package__ to None before executing

this only affects Python 2.6, which fixes the imports in modules run by runpy.py
parent 3a99ebda
......@@ -88,6 +88,7 @@ MONKEY OPTIONS: --verbose %s""" % ', '.join('--[no-]%s' % m for m in modules)
patch_all(**args)
if argv:
sys.argv = argv
__package__ = None
execfile(sys.argv[0])
else:
print script_help
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment