diff options
author | Stephen Morris <stephen@isc.org> | 2011-12-07 17:26:47 +0100 |
---|---|---|
committer | Stephen Morris <stephen@isc.org> | 2011-12-07 17:26:47 +0100 |
commit | 52802deb18632b028815d25f19976d0576d76e1f (patch) | |
tree | 26333b11ae6ea488d8c59114e1077ea609101ce6 /tools | |
parent | [1198] a trivial cleanups: folded some long lines, and fixed indentation. (diff) | |
download | kea-52802deb18632b028815d25f19976d0576d76e1f.tar.xz kea-52802deb18632b028815d25f19976d0576d76e1f.zip |
[1198] Changes as a result of review
Diffstat (limited to 'tools')
-rw-r--r-- | tools/reorder_message_file.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/reorder_message_file.py b/tools/reorder_message_file.py index 3f95544d01..31f4941131 100644 --- a/tools/reorder_message_file.py +++ b/tools/reorder_message_file.py @@ -26,7 +26,7 @@ import sys -def removeEmptyLeadingTrailing(lines): +def remove_empty_leading_trailing(lines): """ Removes leading and trailing empty lines. @@ -124,7 +124,7 @@ def make_dict(lines): while index < len(lines): if lines[index].startswith("%"): # Start of new message - dictionary[message_key] = removeEmptyLeadingTrailing(message_lines) + dictionary[message_key] = remove_empty_leading_trailing(message_lines) message_key = canonicalise_message_line(lines[index]) message_lines = [message_key] else: @@ -132,7 +132,7 @@ def make_dict(lines): index = index + 1 - dictionary[message_key] = removeEmptyLeadingTrailing(message_lines) + dictionary[message_key] = remove_empty_leading_trailing(message_lines) return dictionary @@ -157,7 +157,7 @@ def print_dict(dictionary): print(l.strip()) -def processFile(filename): +def process_file(filename): """ Processes a file by reading it and searching for the first line starting with the '%' sign. Everything before that line is treated as the file @@ -193,4 +193,4 @@ if __name__ == "__main__": if len(sys.argv) != 2: print "Usage: python reorder.py message_file" else: - processFile(sys.argv[1]) + process_file(sys.argv[1]) |