X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=apache%2FModPython.py;h=af9130f79d93f078a86bc2df64ad18a9e61fd0fe;hb=d20644a48d03667bb25dc583517de06e94606c64;hp=07a0fdabd66f2e45ae044fe22a6329c51a672f1e;hpb=1be54e32324eeecd228c620bdcc80e84518864a0;p=plcapi.git diff --git a/apache/ModPython.py b/apache/ModPython.py index 07a0fda..af9130f 100644 --- a/apache/ModPython.py +++ b/apache/ModPython.py @@ -10,10 +10,10 @@ import sys import time import traceback -import xmlrpclib +import xmlrpc.client from mod_python import apache -from PLC.Debug import log +from PLC.Logger import logger from PLC.API import PLCAPI api = PLCAPI() @@ -56,8 +56,6 @@ def handler(req): return apache.OK - except Exception, err: - # Log error in /var/log/httpd/(ssl_)?error_log - t = "[" + time.ctime() + "] [error]" - print >> log, t, err, traceback.format_exc() + except Exception as err: + logger.exception("INTERNAL ERROR !!") return apache.HTTP_INTERNAL_SERVER_ERROR