X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=vstf%2Fvstf%2Fcontroller%2Ffabricant.py;h=3b1c082f0497be2725f5677598d2347f2c10d845;hb=6d9521fff519412e66d585d8f980824414a218eb;hp=c67bfa1970ab8645ff7c7a867b7c958d155a1d14;hpb=9bd22008562f748f82a3053f53a969027876a852;p=bottlenecks.git diff --git a/vstf/vstf/controller/fabricant.py b/vstf/vstf/controller/fabricant.py index c67bfa19..3b1c082f 100755 --- a/vstf/vstf/controller/fabricant.py +++ b/vstf/vstf/controller/fabricant.py @@ -1,3 +1,12 @@ +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + from vstf.rpc_frame_work import constant as const import vstf.common.constants as cst @@ -43,7 +52,9 @@ class Fabricant(object): def __transfer_msg(self, command): def infunc(timeout=cst.TIMEOUT, **kwargs): msg = self.conn.make_msg(command, **kwargs) - return self.conn.call(msg, self.target, timeout) + if self.target: + return self.conn.call(msg, self.target, timeout) + return None infunc.__name__ = command return infunc