[Fuego] [PATCH 5/8] Use actual string name with replace() instead of string.replace()
[email protected] Wed, 20 Apr 2022 15:41:37 +0530
| Newsgroups | dev.linux.lists.fuego |
|---|---|
| Message-ID | <[email protected]> |
From: Shivanand Kunijadar <[email protected]> string.replace() is deprecated function and it is not supported in python3. Use actual string name with replace() which is compatible with python2 and python3. Signed-off-by: Shivanand Kunijadar <[email protected]> --- scripts/ovgen.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ovgen.py b/scripts/ovgen.py index a6e0f13..1386ff5 100755 --- a/scripts/ovgen.py +++ b/scripts/ovgen.py @@ -408,15 +408,15 @@ def generateSpec(ts, fout): for var in ts.variables: varname = "%s_%s" % (ts.name, var) - varname = string.replace(varname, ".", "_").upper() + varname = varname.replace(".", "_").upper() value = "%s" % (ts.variables[var]) outStr = '%s="%s"' % (varname, value) debug_print(outStr, 3) fout.write(outStr + "\n") if ts.fail_case: - tNameUp = string.replace(ts.name, ".", "_").upper() - tNameUp = string.replace(tNameUp, "-", "_").upper() + tNameUp = ts.name.replace(".", "_").upper() + tNameUp = tNameUp.replace("-", "_").upper() fc_num = len(ts.fail_case) outNum = "%s_FAIL_CASE_COUNT=%s" % (tNameUp, fc_num) fout.write(outNum + "\n") -- 2.20.1