[FIX] missing import and remove unused vars.

bzr revid: florent.xicluna@gmail.com-20120115235215-6dgoxyu270bsquba
This commit is contained in:
Florent Xicluna 2012-01-16 00:52:15 +01:00
parent 9b02aed518
commit 9f3096d31f
1 changed files with 4 additions and 5 deletions

View File

@ -30,12 +30,12 @@ import urllib
import xmlrpclib
import StringIO
import errno
import logging
import os
import signal
import sys
import threading
import time
import traceback
import openerp
@ -261,7 +261,7 @@ def http_to_wsgi(http_dir):
def wsgi_handler(environ, start_response):
# Extract from the WSGI environment the necessary data.
scheme = environ['wsgi.url_scheme']
# scheme = environ['wsgi.url_scheme']
headers = {}
for key, value in environ.items():
@ -426,7 +426,7 @@ def serve():
import werkzeug.serving
httpd = werkzeug.serving.make_server(interface, port, application, threaded=True)
logging.getLogger('wsgi').info('HTTP service (werkzeug) running on %s:%s', interface, port)
except ImportError, e:
except ImportError:
import wsgiref.simple_server
logging.getLogger('wsgi').warn('Werkzeug module unavailable, falling back to wsgiref.')
httpd = wsgiref.simple_server.make_server(interface, port, application)
@ -457,7 +457,6 @@ arbiter_pid = None
def on_starting(server):
global arbiter_pid
arbiter_pid = os.getpid() # TODO check if this is true even after replacing the executable
config = openerp.tools.config
#openerp.tools.cache = kill_workers_cache
openerp.netsvc.init_logger()
openerp.osv.osv.start_object_proxy()
@ -499,7 +498,7 @@ def kill_workers():
except OSError, e:
if e.errno == errno.ESRCH: # no such pid
return
raise
raise
class kill_workers_cache(openerp.tools.ormcache):
def clear(self, dbname, *args, **kwargs):