diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2017-02-16 13:27:39 -0600 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-02-20 13:03:42 +0000 |
commit | 6f29913919793ae1630b02d7682109e7a608363f (patch) | |
tree | 11f7a6b19c5cce8343cebba865e89812e9e02f42 /tools | |
parent | 1f36a88109ab5a59b84032d9a2cfb8314f4fbea5 (diff) | |
download | phosphor-logging-6f29913919793ae1630b02d7682109e7a608363f.tar.gz phosphor-logging-6f29913919793ae1630b02d7682109e7a608363f.zip |
elog-gen.py: python3 fixes
Change-Id: I4a96fe626c32e0c8078f8875da48eb06d63e763b
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/elog-gen.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/elog-gen.py b/tools/elog-gen.py index e9f4fc0..b6fc4fe 100755 --- a/tools/elog-gen.py +++ b/tools/elog-gen.py @@ -50,8 +50,8 @@ def order_inherited_errors(i_errors, i_parents): def check_error_inheritance(i_errors, i_parents): for error in i_errors: if(i_parents[error] and (i_parents[error] not in i_errors)): - print (error + " inherits " + i_parents[error] + - " but the latter is not defined") + print(error + " inherits " + i_parents[error] + + " but the latter is not defined") return False return True @@ -112,19 +112,19 @@ def gen_elog_hpp(i_yaml_dir, i_output_hpp, # Verify the error yaml file error_yaml = "/".join((i_yaml_dir, error_yaml)) if (not (os.path.isfile(error_yaml))): - print "Can not find input yaml file " + error_yaml + print("Can not find input yaml file " + error_yaml) exit(1) # Verify the metadata yaml file meta_yaml = get_meta_yaml_file(error_yaml) if (not (os.path.isfile(meta_yaml))): - print "Can not find meta yaml file " + meta_yaml + print("Can not find meta yaml file " + meta_yaml) exit(1) # Verify the input mako file template_path = "/".join((i_template_dir, i_elog_mako)) if (not (os.path.isfile(template_path))): - print "Can not find input template file " + template_path + print("Can not find input template file " + template_path) exit(1) get_elog_data(error_yaml, @@ -138,7 +138,7 @@ def gen_elog_hpp(i_yaml_dir, i_output_hpp, parents)) if(not check_error_inheritance(errors, parents)): - print "Error - failed to validate error inheritance" + print("Error - failed to validate error inheritance") exit(1) errors = order_inherited_errors(errors, parents) @@ -179,7 +179,7 @@ def get_elog_data(i_elog_yaml, match = m break if (match is None): - print "Error - Did not find meta data for " + i['name'] + print("Error - Did not find meta data for " + i['name']) exit(1) # Grab the main error and it's info errors.append(i['name']) |