print syntax error when json dbschema.json failed

This commit is contained in:
Barrabin Fc. ⚑ 2016-03-03 20:47:26 -03:00
parent b2e1f61ff7
commit 99aecedd0b

View file

@ -38,7 +38,7 @@ class SiteStorage:
schema = self.loadJson("dbschema.json")
db_path = self.getPath(schema["db_file"])
except Exception, err:
raise Exception("dbschema.json is not a valid JSON: %s", err)
raise Exception("dbschema.json is not a valid JSON: %s" % err)
if check:
if not os.path.isfile(db_path) or os.path.getsize(db_path) == 0: # Not exist or null