Handle configparser exceptions
Change-Id: I31949a3a1d23e2f254cb53260f9c42f8005d978f
This commit is contained in:
@@ -89,7 +89,12 @@ def main():
|
|||||||
opts.dashboard_file)
|
opts.dashboard_file)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
try:
|
||||||
dashboard = read_dashboard_file(opts.dashboard_file)
|
dashboard = read_dashboard_file(opts.dashboard_file)
|
||||||
|
except configparser.Error as e:
|
||||||
|
print("error: dashboard file '%s' cannot be parsed\n\n%s" %
|
||||||
|
(opts.dashboard_file, e))
|
||||||
|
return 1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
url = generate_dashboard_url(dashboard)
|
url = generate_dashboard_url(dashboard)
|
||||||
|
|||||||
Reference in New Issue
Block a user