Improve PEP8 gluon/rocket.py

This commit is contained in:
Hardirc
2015-03-06 22:20:22 -05:00
parent af62288832
commit 6bbc75df2e
+10 -10
View File
@@ -33,7 +33,7 @@ PY3K = sys.version_info[0] > 2
class NullHandler(logging.Handler): class NullHandler(logging.Handler):
"A Logging handler to prevent library errors." """A Logging handler to prevent library errors."""
def emit(self, record): def emit(self, record):
pass pass
@@ -93,7 +93,7 @@ except ImportError:
# Import Package Modules # Import Package Modules
# package imports removed in monolithic build # package imports removed in monolithic build
# TODO - This part is still very experimental. # TODO - This part is still very experimental.
#from .filelike import FileLikeSocket # from .filelike import FileLikeSocket
class Connection(object): class Connection(object):
@@ -403,7 +403,7 @@ class WSGIExecutor(ThreadPoolExecutor):
class FuturesMiddleware(object): class FuturesMiddleware(object):
"Futures middleware that adds a Futures Executor to the environment" """Futures middleware that adds a Futures Executor to the environment"""
def __init__(self, app, threads=5): def __init__(self, app, threads=5):
self.app = app self.app = app
self.executor = WSGIExecutor(threads) self.executor = WSGIExecutor(threads)
@@ -1087,10 +1087,10 @@ class ThreadPool:
self.app_info['executor'].shutdown(wait=False) self.app_info['executor'].shutdown(wait=False)
# Give them the gun # Give them the gun
#active_threads = [t for t in self.threads if t.isAlive()] # active_threads = [t for t in self.threads if t.isAlive()]
#while active_threads: # while active_threads:
# t = active_threads.pop() # t = active_threads.pop()
# t.kill() # t.kill()
# Wait until they pull the trigger # Wait until they pull the trigger
for t in self.threads: for t in self.threads:
@@ -1515,17 +1515,17 @@ class Worker(Thread):
class SocketTimeout(Exception): class SocketTimeout(Exception):
"Exception for when a socket times out between requests." """Exception for when a socket times out between requests."""
pass pass
class BadRequest(Exception): class BadRequest(Exception):
"Exception for when a client sends an incomprehensible request." """Exception for when a client sends an incomprehensible request."""
pass pass
class SocketClosed(Exception): class SocketClosed(Exception):
"Exception for when a socket is closed by the client." """Exception for when a socket is closed by the client."""
pass pass