From 770ca74a07e70b46583f9bf33cc3106e58365619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odd=20Str=C3=A5b=C3=B8?= Date: Sun, 27 Sep 2020 05:40:30 +0200 Subject: [PATCH] Don't use f-strings (yet) --- .config/generate_xml.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/generate_xml.py b/.config/generate_xml.py index da4ae367..a854960b 100644 --- a/.config/generate_xml.py +++ b/.config/generate_xml.py @@ -35,12 +35,12 @@ except IndexError: dir_path = os.path.dirname(os.path.realpath(__file__)) # Load template file -with open(f'{dir_path}/template.xml', 'r') as f: +with open('{dir_path}/template.xml'.format(**locals()), 'r') as f: tree = ET.parse(f) root = tree.getroot() # Load version dependencies -with open(f'{dir_path}/{py_version}.yaml', 'r') as f: +with open('{dir_path}/{py_version}.yaml'.format(**locals()), 'r') as f: deps = yaml.safe_load(f) # Load version and changelog @@ -53,7 +53,7 @@ for dep in deps: # Update version string addon_version = data.get('version') -root.attrib['version'] = f'{addon_version}+{py_version}' +root.attrib['version'] = '{addon_version}+{py_version}'.format(**locals()) # Changelog date = datetime.today().strftime('%Y-%m-%d') @@ -61,7 +61,7 @@ changelog = data.get('changelog') for section in root.findall('extension'): news = section.findall('news') if news: - news[0].text = f'v{addon_version} ({date}):\n{changelog}' + news[0].text = 'v{addon_version} ({date}):\n{changelog}'.format(**locals()) # Format xml tree indent(root)