summaryrefslogtreecommitdiffstats
path: root/deploy/opera_adapter.py
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2017-03-29 17:30:15 +0800
committerHarry Huang <huangxiangyu5@huawei.com>2017-03-29 18:03:19 +0800
commit8f307233248edcd8d191f7bbb113330170638a72 (patch)
tree6ac543677d522db1785b921b585ebb98242beaec /deploy/opera_adapter.py
parentb52dade4c2d8ee662f22893c9527196e0074b20d (diff)
Fix some opera related error
1. echo a string to compass log to avoid deploy error bing concealed 2. judge return code of ./opera_launch.sh Change-Id: I7ac2bac9b600f289c01116e7f7777d1219a58eb2 Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
Diffstat (limited to 'deploy/opera_adapter.py')
-rw-r--r--deploy/opera_adapter.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/deploy/opera_adapter.py b/deploy/opera_adapter.py
index 71f19951..137aba54 100644
--- a/deploy/opera_adapter.py
+++ b/deploy/opera_adapter.py
@@ -76,14 +76,14 @@ if __name__ == "__main__":
compass_dir = os.getenv('COMPASS_DIR')
if not compass_dir:
- print("env var COMPASS_DIR doesn't exit")
+ print("env var COMPASS_DIR doesn't exist")
sys.exit(1)
if not os.path.exists(dha_file):
- print("DHA file doesn't exit")
+ print("DHA file doesn't exist")
sys.exit(1)
if not os.path.exists(network_file):
- print("NETWORK file doesn't exit")
+ print("NETWORK file doesn't exist")
sys.exit(1)
dha = load_file(dha_file)
@@ -121,3 +121,6 @@ if __name__ == "__main__":
p2 = subprocess.Popen("./opera_launch.sh", cwd=opera_dir, shell=True)
p2.communicate()
+ if p2.returncode != 0:
+ print('./opera_launch.sh fail')
+ sys.exit(1)