summaryrefslogtreecommitdiffstats
path: root/tools/json_schema_compiler/code.py
diff options
context:
space:
mode:
authorricow@chromium.org <ricow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-10 12:19:33 +0000
committerricow@chromium.org <ricow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-10 12:19:33 +0000
commit758b0b7056fc7b518147fd0546b3f615d9b6851a (patch)
treeda66cd6c0403a3e23051d87cc5ab509c3d149b57 /tools/json_schema_compiler/code.py
parentf5ec20caaf9afe15af718dbf7e2116572000de24 (diff)
downloadchromium_src-758b0b7056fc7b518147fd0546b3f615d9b6851a.zip
chromium_src-758b0b7056fc7b518147fd0546b3f615d9b6851a.tar.gz
chromium_src-758b0b7056fc7b518147fd0546b3f615d9b6851a.tar.bz2
Revert revision 176015
This is a manual revert, drover did not like the deleted files > Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it > was only run on IDL files. Clean up all the code which that simplifies. > > TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org > BUG=141318 > > Review URL: https://chromiumcodereview.appspot.com/11747025 TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org Review URL: https://codereview.chromium.org/11778097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176054 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/json_schema_compiler/code.py')
-rw-r--r--tools/json_schema_compiler/code.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/json_schema_compiler/code.py b/tools/json_schema_compiler/code.py
index e4326d4..07f6574 100644
--- a/tools/json_schema_compiler/code.py
+++ b/tools/json_schema_compiler/code.py
@@ -14,17 +14,15 @@ class Code(object):
self._indent_size = indent_size
self._comment_length = comment_length
- def Append(self, line='', substitute=True, indent_level=None):
+ def Append(self, line='', substitute=True):
"""Appends a line of code at the current indent level or just a newline if
line is not specified. Trailing whitespace is stripped.
substitute: indicated whether this line should be affected by
code.Substitute().
"""
- if indent_level is None:
- indent_level = self._indent_level
- self._code.append(Line(((' ' * indent_level) + line).rstrip(),
- substitute=substitute))
+ self._code.append(Line(((' ' * self._indent_level) + line).rstrip(),
+ substitute=substitute))
return self
def IsEmpty(self):