Commit ed08cd04 authored by Hervé Ménager's avatar Hervé Ménager
Browse files

remove last remaining f-string for py2.7 compatibility

parent 93db38b0
Pipeline #42913 passed with stage
in 19 seconds
......@@ -25,11 +25,13 @@ class LabsLinkCommand(BaseCommand):
self.stdout.write(
self.style.SUCCESS("Generating the Profile file in {profile_file_path}...".format(profile_file_path=profile_file_path))
)
provider_id = settings.LABLINKS_PROVIDER_ID
resource_name = settings.LABLINKS_RESOURCE_NAME
resource_description = settings.LABLINKS_RESOURCE_DESCRIPTION
contact_email = settings.LABLINKS_CONTACT_EMAIL
xml_string = f"""<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
lablinks_settings = {
"provider_id": settings.LABLINKS_PROVIDER_ID,
"resource_name": settings.LABLINKS_RESOURCE_NAME,
"resource_description": settings.LABLINKS_RESOURCE_DESCRIPTION,
"contact_email": settings.LABLINKS_CONTACT_EMAIL,
}
xml_string = """<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<providers>
<provider>
<id>{provider_id}</id>
......@@ -38,7 +40,7 @@ class LabsLinkCommand(BaseCommand):
<email>{contact_email}</email>
</provider>
</providers>
"""
""".format(**lablinks_settings)
xml_string = xml.dom.minidom.parseString(xml_string).toprettyxml()
with open(profile_file_path, "w") as profile_file:
profile_file.write(xml_string)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment