Fix JSON output, and make bv-bstctl executable from shell

Change-Id: Ib54fee7529824a675e6f57cec4996fc06154f1d8
This commit is contained in:
Volodymyr Samotiy 2016-03-21 14:04:03 +02:00
parent 4a99302671
commit 40312dca93
1 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,5 @@
#!/usr/bin/python
# (C) Copyright Broadcom Corporation 2016
#
# Licensed under the Apache License, Version 2.0 (the "License");
@ -16,6 +18,7 @@ from broadview_lib.config.bst import *
from broadview_lib.config.broadviewconfig import BroadViewBSTSwitches
import sys
import unittest
import json
class BSTConfigCommand():
def __init__(self):
@ -421,7 +424,7 @@ class BSTConfigCommand():
x.setASIC(asic)
status = x.send()
if status == 200:
ret = x.getJSON()
ret = json.dumps(x.getJSON())
print ret
else:
print "failure: %d" % (status)
@ -470,7 +473,7 @@ class BSTConfigCommand():
status, rep = x.send()
if status == 200:
ret = x.getJSON()
ret = json.dumps(x.getJSON())
print ret
else:
print "failure: %d" % (status)
@ -516,7 +519,7 @@ class BSTConfigCommand():
status, rep = x.send()
if status == 200:
ret = x.getJSON()
ret = json.dumps(x.getJSON())
print ret
else:
print "failure: %d" % (status)