Commit e996abe3 authored by Denis Bilenko's avatar Denis Bilenko

greenlet.py: fix formatting

parent 55324132
...@@ -3,6 +3,7 @@ import os ...@@ -3,6 +3,7 @@ import os
import traceback import traceback
from gevent import core from gevent import core
__all__ = ['getcurrent', __all__ = ['getcurrent',
'TimeoutError', 'TimeoutError',
'Timeout', 'Timeout',
...@@ -15,6 +16,7 @@ __all__ = ['getcurrent', ...@@ -15,6 +16,7 @@ __all__ = ['getcurrent',
'with_timeout', 'with_timeout',
'fork'] 'fork']
try: try:
from py.magic import greenlet from py.magic import greenlet
Greenlet = greenlet Greenlet = greenlet
...@@ -27,6 +29,7 @@ GreenletExit = greenlet.GreenletExit ...@@ -27,6 +29,7 @@ GreenletExit = greenlet.GreenletExit
MAIN = greenlet.getcurrent() MAIN = greenlet.getcurrent()
_threadlocal = None _threadlocal = None
class TimeoutError(Exception): class TimeoutError(Exception):
"""Exception raised if an asynchronous operation times out""" """Exception raised if an asynchronous operation times out"""
...@@ -162,7 +165,6 @@ def signal(signalnum, handler, *args, **kwargs): ...@@ -162,7 +165,6 @@ def signal(signalnum, handler, *args, **kwargs):
return core.signal(signalnum, deliver_exception_to_MAIN) return core.signal(signalnum, deliver_exception_to_MAIN)
def get_hub(): def get_hub():
global _threadlocal global _threadlocal
try: try:
......
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