Index: tools/json_schema_compiler/code.py |
diff --git a/tools/json_schema_compiler/code.py b/tools/json_schema_compiler/code.py |
index 009eb12f16953c80616f29ab3d9d3d8df374ac58..5aa4fb800971f13d737fe292f0afda677f440ee7 100644 |
--- a/tools/json_schema_compiler/code.py |
+++ b/tools/json_schema_compiler/code.py |
@@ -68,7 +68,8 @@ class Code(object): |
Appends a line of code and then increases the indent level. |
""" |
- self.Append(line) |
+ if line is not None: |
+ self.Append(line) |
self._indent_level += self._indent_size |
return self |
@@ -80,7 +81,8 @@ class Code(object): |
#if not isinstance(line, basestring): |
# raise TypeError |
self._indent_level -= self._indent_size |
- self.Append(line) |
+ if line is not None: |
+ self.Append(line) |
return self |
def Comment(self, comment, comment_prefix='// '): |