Skip to content

Python3 compatible #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
click==6.7
click==7.0
11 changes: 6 additions & 5 deletions weblogic_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import os
import socket
import logging
from StringIO import StringIO
from io import StringIO
from xml.etree import ElementTree
from BaseHTTPServer import HTTPServer
from SocketServer import ThreadingMixIn
from SimpleHTTPServer import SimpleHTTPRequestHandler
from http.server import HTTPServer
from socketserver import ThreadingMixIn
from http.server import SimpleHTTPRequestHandler


class NonBlockingHTTPServer(ThreadingMixIn, HTTPServer):
Expand Down Expand Up @@ -122,7 +122,7 @@ def handle_one_request(self):
method = getattr(self, mname)
method()
self.wfile.flush() # actually send the response if not already done.
except socket.timeout, e:
except socket.timeout as e:
# a read or a write timed out. Discard this connection
self.log_error("Request timed out: %r", e)
self.close_connection = 1
Expand Down Expand Up @@ -167,3 +167,4 @@ def alert(cls, request, payload):
httpd.server_close()

start()