Put the mx.DateTime.strptime fix globaly
This commit is contained in:
1 parent
13ce9f7059
commit
fb14e6abbe
1 file changed
+5
-5
+5
-5
@@ -19,6 +19,11 @@ import web_service
|
||||
import wkf_service
|
||||
from trytond.modules import register_classes
|
||||
import mx.DateTime
|
||||
|
||||
if not hasattr(mx.DateTime, 'strptime'):
|
||||
mx.DateTime.strptime = lambda x, y: mx.DateTime.mktime(
|
||||
time.strptime(x, y))
|
||||
|
||||
from getpass import getpass
|
||||
import sha
|
||||
import logging
|
||||
@@ -57,17 +62,12 @@ class TrytonServer(object):
|
||||
|
||||
self.logger = logging.getLogger("init")
|
||||
|
||||
if not hasattr(mx.DateTime, 'strptime'):
|
||||
mx.DateTime.strptime = lambda x, y: mx.DateTime.mktime(
|
||||
time.strptime(x, y))
|
||||
|
||||
self.logger.info('using %s as configuration file' % CONFIG.configfile)
|
||||
self.logger.info('initialising distributed objects services')
|
||||
|
||||
self.dispatcher = netsvc.Dispatcher()
|
||||
self.dispatcher.monitor(signal.SIGINT)
|
||||
|
||||
|
||||
web_service.DB()
|
||||
web_service.Common()
|
||||
web_service.Object()
|
||||
|
||||
Reference in new issue
Block a user