Chromium Code Reviews| Index: tools/json_schema_compiler/model.py |
| diff --git a/tools/json_schema_compiler/model.py b/tools/json_schema_compiler/model.py |
| index 23b77c6d1402dba8ee88cf0d33b7f78b28b0ef81..31bc75401f1201f4d150656a9590fae995a0502f 100644 |
| --- a/tools/json_schema_compiler/model.py |
| +++ b/tools/json_schema_compiler/model.py |
| @@ -190,7 +190,8 @@ class Property(object): |
| elif '$ref' in json: |
| self.ref_type = json['$ref'] |
| self.type_ = PropertyType.REF |
| - elif 'enum' in json: |
| + elif 'enum' in json and all(isinstance(value, basestring) |
| + for value in json['enum']): |
|
not at google - send to devlin
2012/06/12 18:34:38
Could you move the second check inside this block?
benjhayden
2012/06/12 20:15:42
Actually, I did this specifically so that it would
|
| self.enum_values = [] |
| for value in json['enum']: |
| self.enum_values.append(value) |