fix problem in python 2 where warcprox was always single-threaded, because of "old-style" class inheritance issues

This commit is contained in:
Noah Levitt 2017-02-06 10:56:54 -08:00
parent adb264b40e
commit 7c1d5796a3
2 changed files with 5 additions and 3 deletions

View File

@ -51,7 +51,7 @@ except:
setuptools.setup(
name='warcprox',
version='2.1b1.dev50',
version='2.1b1.dev51',
description='WARC writing MITM HTTP/S proxy',
url='https://github.com/internetarchive/warcprox',
author='Noah Levitt',

View File

@ -343,8 +343,10 @@ class RecordedUrl:
self.host = host
self.duration = duration
class SingleThreadedWarcProxy(http_server.HTTPServer):
# inherit from object so that multiple inheritance from this class works
# properly in python 2
# http://stackoverflow.com/questions/1713038/super-fails-with-error-typeerror-argument-1-must-be-type-not-classobj#18392639
class SingleThreadedWarcProxy(http_server.HTTPServer, object):
logger = logging.getLogger("warcprox.warcproxy.WarcProxy")
def __init__(