bugfix: container start failed due to config_file set to Nonetype 33/41033/1
authorSerenaFeng <feng.xiaowei@zte.com.cn>
Tue, 5 Sep 2017 03:45:45 +0000 (11:45 +0800)
committerSerenaFeng <feng.xiaowei@zte.com.cn>
Tue, 5 Sep 2017 03:45:45 +0000 (11:45 +0800)
commitab38b8924b8b39eb44201f9bfa41f009a3eea0a1
treecbc0f87a5fd44d884f6cae51924f6c3f4359debc
parent0c7bc1c58ce45b5c19a1c4f1a757363efe819a49
bugfix: container start failed due to config_file set to Nonetype

Traceback (most recent call last):
  File "/usr/local/bin/opnfv-testapi", line 6, in <module>
    from opnfv_testapi.cmd.server import main
  File "/usr/local/lib/python2.7/dist-packages/opnfv_testapi/cmd/server.py", line 34, in <module>
    from opnfv_testapi.common.config import CONF
  File "/usr/local/lib/python2.7/dist-packages/opnfv_testapi/common/config.py", line 67, in <module>
    CONF = Config()
  File "/usr/local/lib/python2.7/dist-packages/opnfv_testapi/common/config.py", line 21, in __init__
    self._parse()
  File "/usr/local/lib/python2.7/dist-packages/opnfv_testapi/common/config.py", line 29, in _parse
    if not os.path.exists(self.config_file):
  File "/usr/lib/python2.7/genericpath.py", line 18, in exists
    os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

Change-Id: Ifa26b5b52e7f1c19a773b02ecc1c45b59b5dc09b
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
utils/test/testapi/opnfv_testapi/common/config.py