diff --git a/python/gen_version.py b/python/gen_version.py index 453e4ad99cfcd9bd1d31f466662926042996e143..258905f5815f6af01398479732b907c80cb9d739 100644 --- a/python/gen_version.py +++ b/python/gen_version.py @@ -23,7 +23,11 @@ def update_info(file_name, feature, info): with open(file_name, "r") as f: for line in f.readlines(): if re.match(feature, line): - line = feature + " = \"" + info.strip() + "\"\n" + if isinstance(info, str): + line = feature + " = \"" + info.strip() + "\"\n" + else: + line = feature + " = \"" + info.decode('utf-8').strip( + ) + "\"\n" new_str = new_str + line with open(file_name, "w") as f: