Skip to content

Commit 7514f08

Browse files
committed
Fixed Python 2 compatibility in CGI test
1 parent c09ef05 commit 7514f08

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

jsonrpclib/SimpleJSONRPCServer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
limitations under the License.
2727
"""
2828

29+
# We use print() in the CGI request handler
30+
from __future__ import print_function
31+
2932
# Standard library
3033
import logging
3134
import socket

tests/test_cgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
try:
1616
from http.server import HTTPServer, CGIHTTPRequestHandler
1717
except ImportError:
18-
from SimpleHTTPServer import HTTPServer
18+
from BaseHTTPServer import HTTPServer
1919
from CGIHTTPServer import CGIHTTPRequestHandler
2020

2121
# JSON-RPC library

0 commit comments

Comments
 (0)