def run(self):
if cherrypy.__version__.startswith('3.'):
cherrypy.quickstart(root=self.server, config=self.app_config)
- elif cherrypy.__version__.startswith('2.'):
- cherrypy.server.start()
# if self.pkey_file == None or self.cert_file == None:
# logging.info("http://%s:%d/" % web.validip(self.ip_address))
app_config[url] = digest_auth
self.server = server
self.app_config = app_config
- elif cherrypy.__version__.startswith('2.'):
- cherrypy.root = server
- cherrypy.config.update({
- 'server.environment': 'production',
- 'server.socket_host': self.options.address,
- 'server.socket_port': int(self.options.port),
- 'decoding_filter.on': True,
- 'encoding_filter.on': True,
- 'encodinf_filter.encoding': 'utf8',
- 'static_filter.on': True,
- 'static_filter.dir': static_dir,
- })
- cherrypy.server.start()
else:
raise NotImplementedError(
'Unsupported CherryPy version %s' % cherrypy.__version__)