From 8c1e84b5f4c4da0d7a5f6fb246dd038b1921a0e9 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Fri, 24 Oct 2014 14:23:52 +0200 Subject: [PATCH] validate-launcher: pep8ify sources. https://bugzilla.gnome.org/show_bug.cgi?id=739208 --- validate/launcher/RangeHTTPServer.py | 31 ++-- validate/launcher/apps/gstvalidate.py | 130 ++++++++++------ .../apps/validate/validate_testsuite.py | 66 ++++---- validate/launcher/baseclasses.py | 111 +++++++------ validate/launcher/httpserver.py | 21 +-- validate/launcher/loggable.py | 50 +++--- validate/launcher/main.py | 146 ++++++++++-------- validate/launcher/reporters.py | 26 ++-- validate/launcher/utils.py | 31 ++-- 9 files changed, 359 insertions(+), 253 deletions(-) diff --git a/validate/launcher/RangeHTTPServer.py b/validate/launcher/RangeHTTPServer.py index b87277a9f0..fb97f5cc1e 100644 --- a/validate/launcher/RangeHTTPServer.py +++ b/validate/launcher/RangeHTTPServer.py @@ -1,7 +1,7 @@ #!/usr/bin/env python2 -#Portions Copyright (C) 2009,2010 Xyne -#Portions Copyright (C) 2011 Sean Goller +# Portions Copyright (C) 2009,2010 Xyne +# Portions Copyright (C) 2011 Sean Goller # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -15,7 +15,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. """Range HTTP Server. @@ -48,6 +49,7 @@ except ImportError: _bandwidth = 0 + class RangeHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Simple HTTP request handler with GET and HEAD commands. @@ -151,7 +153,8 @@ class RangeHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): ei = int(e) if ei < size: start_range = size - ei - self.send_header("Content-Range", 'bytes ' + str(start_range) + '-' + str(end_range - 1) + '/' + str(size)) + self.send_header("Content-Range", 'bytes ' + str( + start_range) + '-' + str(end_range - 1) + '/' + str(size)) self.send_header("Content-Length", end_range - start_range) self.send_header("Last-Modified", self.date_time_string(fs.st_mtime)) self.end_headers() @@ -174,7 +177,8 @@ class RangeHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): f = StringIO() displaypath = cgi.escape(urllib.unquote(self.path)) f.write('') - f.write("\nDirectory listing for %s\n" % displaypath) + f.write("\nDirectory listing for %s\n" % + displaypath) f.write("\n

Directory listing for %s

\n" % displaypath) f.write("
\n