Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1253)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/reflection_handler.py

Issue 2064313003: Rename files in webkitpy/tool to have underscores between words (for consistency). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/reflection_handler.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/reflection_handler.py
similarity index 92%
rename from third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py
rename to third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/reflection_handler.py
index c71b45b46f59c105518310532aa099bc5c639215..63962f86e9436064bb725ca471348228c6aeec97 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/servers/reflection_handler.py
@@ -68,6 +68,11 @@ class ReflectionHandler(BaseHTTPServer.BaseHTTPRequestHandler):
return json.loads(self.read_entity_body())
def _handle_request(self):
+ # The query attribute is used in subclasses. If we want to set it in the constructor,
+ # we have to override the superclass constructor, although the docs
+ # (https://docs.python.org/2/library/basehttpserver.html) say "Subclasses should
+ # not need to override or extend the __init__() method."
+ # pylint: disable=attribute-defined-outside-init
if "?" in self.path:
path, query_string = self.path.split("?", 1)
self.query = cgi.parse_qs(query_string)
@@ -97,8 +102,8 @@ class ReflectionHandler(BaseHTTPServer.BaseHTTPRequestHandler):
def quitquitquit(self):
self._serve_text("Server quit.\n")
# Shutdown has to happen on another thread from the server's thread,
- # otherwise there's a deadlock
- threading.Thread(target=lambda: self.server.shutdown()).start()
+ # otherwise there's a deadlock.
+ threading.Thread(target=self.server.shutdown).start()
def _send_access_control_header(self):
if self.allow_cross_origin_requests:

Powered by Google App Engine
This is Rietveld 408576698