From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mogw0421.ocn.ad.jp (mogw0421.ocn.ad.jp [118.23.109.49]) by dpdk.org (Postfix) with ESMTP id 632D825A1 for ; Mon, 23 Apr 2018 08:23:42 +0200 (CEST) Received: from mf-smf-ucb029c2 (mf-smf-ucb029c2.ocn.ad.jp [153.153.66.195]) by mogw0421.ocn.ad.jp (Postfix) with ESMTP id 67723444260; Mon, 23 Apr 2018 15:23:40 +0900 (JST) Received: from ntt.pod01.mv-mta-ucb029 ([153.149.230.163]) by mf-smf-ucb029c2 with ESMTP id AUt0fQ4igNw9HAUt2fO0mS; Mon, 23 Apr 2018 15:23:40 +0900 Received: from smtp.ocn.ne.jp ([153.149.227.167]) by ntt.pod01.mv-mta-ucb029 with id diPg1x0033dLKTM01iPgPB; Mon, 23 Apr 2018 06:23:40 +0000 Received: from localhost.localdomain (sp1-72-1-217.msc.spmode.ne.jp [1.72.1.217]) by smtp.ocn.ne.jp (Postfix) with ESMTPA; Mon, 23 Apr 2018 15:23:40 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: ferruh.yigit@intel.com, geminoa@juno.ocn.ne.jp Cc: spp@dpdk.org, ogawa.yasufumi@lab.ntt.co.jp Date: Mon, 23 Apr 2018 15:22:35 +0900 Message-Id: <20180423054630.6789-2-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20180423054630.6789-1-ogawa.yasufumi@lab.ntt.co.jp> References: <20180423054630.6789-1-ogawa.yasufumi@lab.ntt.co.jp> X-Account-Key: account3 X-UIDL: 10321.C+yeiKapqgpPpR0PMhskAS,GBsE= X-Mozilla-Status: 0000 Received: from mzcmta003.ocn.ad.jp (LHLO mzcmta003.ocn.ad.jp) (118.23.184.202) by mzcstore251.ocn.ad.jp with LMTP; Mon, 23 Apr 2018 14:46:33 +0900 (JST) Received: from mfgw722.ocn.ad.jp (mfgw722.ocn.ad.jp [153.153.63.105]) by mzcmta003.ocn.ad.jp (Postfix) with ESMTP id 91BEC1504598 for ; Mon, 23 Apr 2018 14:46:33 +0900 (JST) Received-SPF: softfail (mf-ofc-ucb072: domain of transitioning dose not designate client-ip as permitted sender) client-ip=153.149.232.7; envelope-from=; helo=mogw0706.ocn.ad.jp; Authentication-Results: mf-ofc-ucb072; spf=softfail smtp.mailfrom=ogawa.yasufumi@lab.ntt.co.jp Received: from mogw0706.ocn.ad.jp (mogw0706.ocn.ad.jp [153.149.232.7]) by mfgw722.ocn.ad.jp (Postfix) with ESMTP id 72A9E9C027C for ; Mon, 23 Apr 2018 14:46:33 +0900 (JST) Received: from mf-smf-ucb019c2 (mf-smf-ucb019c2.ocn.ad.jp [153.153.66.131]) by mogw0706.ocn.ad.jp (Postfix) with ESMTP id 66B0D1300143; Mon, 23 Apr 2018 14:46:33 +0900 (JST) Received: from ntt.pod01.mv-mta-ucb022 ([153.149.142.85]) by mf-smf-ucb019c2 with ESMTP id AUIwfMn8R0p0uAUJ7foevX; Mon, 23 Apr 2018 14:46:33 +0900 Received: from smtp.ocn.ne.jp ([153.149.227.134]) by ntt.pod01.mv-mta-ucb022 with id dhmZ1x0012ud8JZ01hmZYs; Mon, 23 Apr 2018 05:46:33 +0000 Received: from localhost.localdomain (sp1-72-1-217.msc.spmode.ne.jp [1.72.1.217]) by smtp.ocn.ne.jp (Postfix) with ESMTPA; Mon, 23 Apr 2018 14:46:33 +0900 (JST) X-Mailer: git-send-email 2.13.1 In-Reply-To: <20180423054630.6789-1-ogawa.yasufumi@lab.ntt.co.jp> References: <20180423054630.6789-1-ogawa.yasufumi@lab.ntt.co.jp> Subject: [spp] [PATCH 1/3] controller: move import websocket X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2018 06:23:43 -0000 From: ogawa.yasufumi@lab.ntt.co.jp From: Yasufumi Ogawa To avoid error for a user who does not install websocket, move import statement from top of the file into to_http method which calls websocket. Signed-off-by: Yasufumi Ogawa --- src/controller/topo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/topo.py b/src/controller/topo.py index 76dd54f..aa81e03 100644 --- a/src/controller/topo.py +++ b/src/controller/topo.py @@ -8,7 +8,6 @@ from spp_common import logger import subprocess import traceback import uuid -import websocket import yaml @@ -250,6 +249,7 @@ class Topo(object): subprocess.call("rm -f %s" % tmpfile, shell=True) def to_http(self, sec_list): + import websocket tmpfile = "%s.dot" % uuid.uuid4().hex self.to_dot(sec_list, tmpfile) msg = open(tmpfile).read() -- 2.13.1