forked from github/pelican
Merge pull request #2184 from jonaslb/fabfilefix
Correct import of socketserver on Python 3
This commit is contained in:
commit
706c6f6f2f
1 changed files with 5 additions and 2 deletions
|
|
@ -3,7 +3,10 @@ import fabric.contrib.project as project
|
|||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import SocketServer
|
||||
try:
|
||||
import socketserver
|
||||
except ImportError:
|
||||
import SocketServer as socketserver
|
||||
|
||||
from pelican.server import ComplexHTTPRequestHandler
|
||||
|
||||
|
|
@ -48,7 +51,7 @@ def serve():
|
|||
"""Serve site at http://localhost:8000/"""
|
||||
os.chdir(env.deploy_path)
|
||||
|
||||
class AddressReuseTCPServer(SocketServer.TCPServer):
|
||||
class AddressReuseTCPServer(socketserver.TCPServer):
|
||||
allow_reuse_address = True
|
||||
|
||||
server = AddressReuseTCPServer(('', PORT), ComplexHTTPRequestHandler)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue