Skip to content

Commit

Permalink
Fix ThreadingMixIn import for Python 3
Browse files Browse the repository at this point in the history
* SocketServer was renamed to socketserver in Python 3.
  • Loading branch information
mouchar committed Sep 13, 2019
1 parent df496ab commit a4a510d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gearbox/commands/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,10 @@ def get_request(self):
server_class = SecureWSGIServer

if threaded:
from SocketServer import ThreadingMixIn
try:
from socketserver import ThreadingMixIn
except ImportError:
from SocketServer import ThreadingMixIn
class GearboxWSGIServer(ThreadingMixIn, server_class): pass
server_type = 'Threaded'
else:
Expand Down

0 comments on commit a4a510d

Please sign in to comment.