Merge "Add hacking checks to watcher"

This commit is contained in:
Jenkins
2016-07-27 09:10:06 +00:00
committed by Gerrit Code Review
31 changed files with 398 additions and 75 deletions

View File

@@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import json
from oslo_serialization import jsonutils
from oslo_utils import strutils
import six
import wsme
@@ -118,7 +118,7 @@ class JsonType(wtypes.UserType):
@staticmethod
def validate(value):
try:
json.dumps(value)
jsonutils.dumps(value, default=None)
except TypeError:
raise exception.Invalid(_('%s is not JSON serializable') % value)
else: