Whitespace fixes for python-3 support
PATCH 1/1 Whitespace fixes for python-3 support
This patch includes some whitespace fixes to support Python 3 (which doesn't love mixing spaces and tabs that much).
Signed-off-by Sven Vermeulen <[email protected]>
--- support/genclassperms.py | 8 ++++---- support/sedoctool.py | 18 +++++++++--------- support/segenxml.py | 12 ++++++------ 3 files changed, 19 insertions(+), 19 deletions(-)
support/genclassperms.py +4 -4
@@ -287,10 +287,10 @@ def error(error): Print an error message and exit. """ - sys.stderr.write("%s exiting for: " % sys.argv[0]) - sys.stderr.write("%s\n" % error) - sys.stderr.flush() - sys.exit(1) + sys.stderr.write("%s exiting for: " % sys.argv[0]) + sys.stderr.write("%s\n" % error) + sys.stderr.flush() + sys.exit(1) # MAIN PROGRAM app_name = sys.argv[0]
support/sedoctool.py +9 -9
@@ -1,7 +1,7 @@ #!/usr/bin/python # Author: Joshua Brindle <[email protected]> -# Caleb Case <[email protected]> +# Caleb Case <[email protected]> # # Copyright (C) 2005 - 2006 Tresys Technology, LLC # This program is free software; you can redistribute it and/or modify
@@ -80,7 +80,7 @@ def gen_booleans_conf(doc, file_name, namevalue_list): bool_val = BOOL_DISABLED if bool_name and bool_val: - file_name.write("%s = %s\n\n" % (bool_name, bool_val)) + file_name.write("%s = %s\n\n" % (bool_name, bool_val)) bool_name = bool_val = None # tunables are currently implemented as booleans
@@ -105,7 +105,7 @@ def gen_booleans_conf(doc, file_name, namevalue_list): bool_val = BOOL_DISABLED if bool_name and bool_val: - file_name.write("%s = %s\n\n" % (bool_name, bool_val)) + file_name.write("%s = %s\n\n" % (bool_name, bool_val)) bool_name = bool_val = None def gen_module_conf(doc, file_name, namevalue_list):
@@ -364,7 +364,7 @@ def gen_docs(doc, working_dir, templatedir): #arg, i have to go through this dom tree ahead of time to build up the menus module_list = {} for node in doc.getElementsByTagName("module"): - mod_name = mod_layer = interface_buf = '' + mod_name = mod_layer = interface_buf = '' mod_name = node.getAttribute("name") mod_layer = node.parentNode.getAttribute("name")
@@ -428,7 +428,7 @@ def gen_docs(doc, working_dir, templatedir): all_tunables = [] all_booleans = [] for node in doc.getElementsByTagName("module"): - mod_name = mod_layer = mod_desc = interface_buf = '' + mod_name = mod_layer = mod_desc = interface_buf = '' mod_name = node.getAttribute("name") mod_layer = node.parentNode.getAttribute("name")
@@ -753,10 +753,10 @@ def error(error): Print an error message and exit. """ - sys.stderr.write("%s exiting for: " % sys.argv[0]) - sys.stderr.write("%s\n" % error) - sys.stderr.flush() - sys.exit(1) + sys.stderr.write("%s exiting for: " % sys.argv[0]) + sys.stderr.write("%s\n" % error) + sys.stderr.flush() + sys.exit(1) def warning(warn): """
support/segenxml.py +6 -6
@@ -1,9 +1,9 @@ #!/usr/bin/python # Author(s): Donald Miner <[email protected]> -# Dave Sugar <[email protected]> -# Brian Williams <[email protected]> -# Caleb Case <[email protected]> +# Dave Sugar <[email protected]> +# Brian Williams <[email protected]> +# Caleb Case <[email protected]> # # Copyright (C) 2005 - 2006 Tresys Technology, LLC # This program is free software; you can redistribute it and/or modify
@@ -335,9 +335,9 @@ def error(description): ''' sys.stderr.write("%s: " % sys.argv[0] ) - sys.stderr.write("error: " + description + "\n") - sys.stderr.flush() - sys.exit(1) + sys.stderr.write("error: " + description + "\n") + sys.stderr.flush() + sys.exit(1)
Signature · 1 line
1.7.3.4
PATCH 1/1 Whitespace fixes for python-3 support
Please ignore this patch, there are still some other issues with it. I'll send an updated patch later.
Wkr,
Sven Vermeulen