From 2f10d39a98eb4815e4b2d677e210febeed45b7ca Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Sat, 26 Dec 2015 20:19:09 -0500 Subject: Make the config existence check scripts try to actually load the JSON. --- scripts/check-config | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts/check-config') diff --git a/scripts/check-config b/scripts/check-config index 58a1a3f..55d5467 100755 --- a/scripts/check-config +++ b/scripts/check-config @@ -22,14 +22,17 @@ import sys -import os +import json import defaults print("Checking build configuration") -if not os.path.exists(defaults.BUILD_CONFIG): - print("Build config does not exist") +try: + with open(defaults.BUILD_CONFIG, 'r') as f: + build_config = json.load(f) +except: + print("Build config does not exist or is not a valid JSON file") print("Please run the ./configure script and try again") sys.exit(1) -- cgit v1.2.3