Import netrpc only if needed
This commit is contained in:
1 parent
54d750a624
commit
73feb75837
2 files changed
+1
-3
No files matched your search
@@ -1,4 +1,2 @@
|
||||
#This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
#this repository contains the full copyright notices and license terms.
|
||||
|
||||
import netrpc
|
||||
+1
-1
@@ -12,7 +12,6 @@ import sys, os, signal
|
||||
import netsvc
|
||||
import time
|
||||
from trytond.backend import Database, DatabaseOperationalError
|
||||
from trytond.protocols.netrpc import NetRPCServerThread
|
||||
from config import CONFIG
|
||||
from trytond.modules import register_classes
|
||||
import mx.DateTime
|
||||
@@ -149,6 +148,7 @@ class TrytonServer(object):
|
||||
CONFIG['xmlport']))
|
||||
|
||||
if CONFIG['netrpc']:
|
||||
from trytond.protocols.netrpc import NetRPCServerThread
|
||||
netrpcd = NetRPCServerThread(CONFIG['interface'], CONFIG['netport'],
|
||||
CONFIG['secure_netrpc'])
|
||||
self.logger.info("starting NetRPC%s protocol, port %d" % \
|
||||
|
||||
Reference in new issue
Block a user