Import netrpc only if needed

This commit is contained in:
Cédric Krier committed 2009-02-12 18:31:22 +01:00
1 parent 54d750a624
commit 73feb75837
2 files changed
+1 -3

No files matched your search

-2
View File
@@ -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
View File
@@ -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" % \