Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: tools/json_schema_compiler/code.py

Issue 12041098: Initial commit of the Dart Chrome Extension APIs generators (Closed) Base URL: http://git.chromium.org/chromium/src.git@file_path_bugfix
Patch Set: Fixed to work with json_schema_compiler changes, fixed style & structure issues, and implemented a … Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/json_schema_compiler/compiler.py » ('j') | tools/json_schema_compiler/compiler.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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='// '):
« no previous file with comments | « no previous file | tools/json_schema_compiler/compiler.py » ('j') | tools/json_schema_compiler/compiler.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698