diff options
author | Doug Zongker <dougz@android.com> | 2009-12-08 12:45:02 -0800 |
---|---|---|
committer | Doug Zongker <dougz@android.com> | 2009-12-09 12:31:00 -0800 |
commit | 5ae770fc0e43172e1efc5146a38e7d1f452143e2 (patch) | |
tree | cf25d845b8da0f76fcf9e4a125952d5a2c0b694c /tools/event_log_tags.py | |
parent | 3a59b2ceb9fee68eef0428e5458edfbb9e09936c (diff) | |
download | build-5ae770fc0e43172e1efc5146a38e7d1f452143e2.zip build-5ae770fc0e43172e1efc5146a38e7d1f452143e2.tar.gz build-5ae770fc0e43172e1efc5146a38e7d1f452143e2.tar.bz2 |
add option to @hide classes generated from .logtags files
Generate a javadoc @hide comment on the class when "option
javadoc_hide true" is specified in the input .logtags file.
Diffstat (limited to 'tools/event_log_tags.py')
-rw-r--r-- | tools/event_log_tags.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/event_log_tags.py b/tools/event_log_tags.py index fc05aff..4e6d960 100644 --- a/tools/event_log_tags.py +++ b/tools/event_log_tags.py @@ -93,6 +93,18 @@ class TagFile(object): self.AddError(str(e)) +def BooleanFromString(s): + """Interpret 's' as a boolean and return its value. Raise + ValueError if it's not something we can interpret as true or + false.""" + s = s.lower() + if s in ("true", "t", "1", "on", "yes", "y"): + return True + if s in ("false", "f", "0", "off", "no", "n"): + return False + raise ValueError("'%s' not a valid boolean" % (s,)) + + def WriteOutput(output_file, data): """Write 'data' to the given output filename (which may be None to indicate stdout). Emit an error message and die on any failure. |