qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1671883 - /qpid/dispatch/trunk/python/qpid_dispatch_internal/management/qdrouter.py
Date Tue, 07 Apr 2015 16:06:15 GMT
Author: aconway
Date: Tue Apr  7 16:06:14 2015
New Revision: 1671883

URL: http://svn.apache.org/r1671883
Log:
NO-JIRA: Improved error message if json schema parsing fails.

Modified:
    qpid/dispatch/trunk/python/qpid_dispatch_internal/management/qdrouter.py

Modified: qpid/dispatch/trunk/python/qpid_dispatch_internal/management/qdrouter.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpid_dispatch_internal/management/qdrouter.py?rev=1671883&r1=1671882&r2=1671883&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpid_dispatch_internal/management/qdrouter.py (original)
+++ qpid/dispatch/trunk/python/qpid_dispatch_internal/management/qdrouter.py Tue Apr  7 16:06:14
2015
@@ -37,7 +37,10 @@ class QdSchema(schema.Schema):
     def __init__(self):
         """Load schema."""
         qd_schema = get_data('qpid_dispatch.management', 'qdrouter.json')
-        super(QdSchema, self).__init__(**json.loads(qd_schema, **JSON_LOAD_KWARGS))
+        try:
+            super(QdSchema, self).__init__(**json.loads(qd_schema, **JSON_LOAD_KWARGS))
+        except Exception,e:
+            raise ValueError("Invalid schema qdrouter.json: %s" % e)
         self.configuration_entity = self.entity_type(self.CONFIGURATION_ENTITY)
         self.operational_entity = self.entity_type(self.OPERATIONAL_ENTITY)
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message