Index: tools/json_schema_compiler/model.py |
diff --git a/tools/json_schema_compiler/model.py b/tools/json_schema_compiler/model.py |
index cc876dfad77730e9d72eaad52c73fff75b63fdf3..336563c6cfe8499d77942cffe3775ae7b3a707bd 100644 |
--- a/tools/json_schema_compiler/model.py |
+++ b/tools/json_schema_compiler/model.py |
@@ -486,8 +486,11 @@ class Platforms(object): |
WIN = _PlatformInfo("win") |
def _GetPlatforms(json): |
- if 'platforms' not in json: |
+ if 'platforms' not in json or json['platforms'] == None: |
return None |
+ # Check whether "platforms" is an empty list. |
not at google - send to devlin
2013/10/29 14:36:52
More accurate would be to say "Sanity check: platf
Haojian Wu
2013/10/30 00:42:47
Done.
|
+ if not json['platforms']: |
+ raise ValueError('"platforms" cannot be an empty list') |
platforms = [] |
for platform_name in json['platforms']: |
for platform_enum in _Enum.GetAll(Platforms): |