Browse code

Fix pep8 errors

This commit fixes pep8 errors.

Change-Id: Ia1f1d61081a86b8a58251918392171cbc60f5ab8

Masayuki Igawa authored on 2014/02/24 18:42:37
Showing 2 changed files
... ...
@@ -1,7 +1,20 @@
1 1
 #!/usr/bin/python
2
-import urllib
2
+
3
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
4
+#    not use this file except in compliance with the License. You may obtain
5
+#    a copy of the License at
6
+#
7
+#         http://www.apache.org/licenses/LICENSE-2.0
8
+#
9
+#    Unless required by applicable law or agreed to in writing, software
10
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
+#    License for the specific language governing permissions and limitations
13
+#    under the License.
14
+
3 15
 import json
4 16
 import sys
17
+import urllib
5 18
 
6 19
 
7 20
 def print_usage():
... ...
@@ -42,4 +55,4 @@ for job_url in root['jobs']:
42 42
                                        'logUrl': log_url,
43 43
                                        'healthReport': config['healthReport']})
44 44
 
45
-print json.dumps(results)
45
+print(json.dumps(results))
... ...
@@ -1,10 +1,23 @@
1
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
2
+#    not use this file except in compliance with the License. You may obtain
3
+#    a copy of the License at
4
+#
5
+#         http://www.apache.org/licenses/LICENSE-2.0
6
+#
7
+#    Unless required by applicable law or agreed to in writing, software
8
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10
+#    License for the specific language governing permissions and limitations
11
+#    under the License.
12
+
13
+import BaseHTTPServer
14
+import SimpleHTTPServer
1 15
 import sys
2
-from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
3
-from SimpleHTTPServer import SimpleHTTPRequestHandler
4 16
 
5
-def main(host, port, HandlerClass = SimpleHTTPRequestHandler,
6
-         ServerClass = HTTPServer, protocol="HTTP/1.0"):
7
-    """simple http server that listens on a give address:port"""
17
+
18
+def main(host, port, HandlerClass=SimpleHTTPServer.SimpleHTTPRequestHandler,
19
+         ServerClass=BaseHTTPServer.HTTPServer, protocol="HTTP/1.0"):
20
+    """simple http server that listens on a give address:port."""
8 21
 
9 22
     server_address = (host, port)
10 23
 
... ...
@@ -12,7 +25,7 @@ def main(host, port, HandlerClass = SimpleHTTPRequestHandler,
12 12
     httpd = ServerClass(server_address, HandlerClass)
13 13
 
14 14
     sa = httpd.socket.getsockname()
15
-    print "Serving HTTP on", sa[0], "port", sa[1], "..."
15
+    print("Serving HTTP on", sa[0], "port", sa[1], "...")
16 16
     httpd.serve_forever()
17 17
 
18 18
 if __name__ == '__main__':