🎨 pyupgrade --py37-plus

This commit is contained in:
Gina Häußge committed 2021-03-11 16:01:02 +01:00
1 parent a71f6fcd40
commit fd2ece0f13
84 files changed
+511 -716

No files matched your search

+4 -4
View File
@@ -142,14 +142,14 @@ def executeSystemCommand(source, command):
)
)
else:
logger.info("Performing command for {}:{}".format(source, command))
logger.info(f"Performing command for {source}:{command}")
try:
if "before" in command_spec and callable(command_spec["before"]):
command_spec["before"]()
except Exception as e:
if not do_ignore:
error = 'Command "before" for {}:{} failed: {}'.format(source, command, e)
error = f'Command "before" for {source}:{command} failed: {e}'
logger.warning(error)
abort(500, description=error)
@@ -192,7 +192,7 @@ def executeSystemCommand(source, command):
except Exception as e:
if not do_ignore:
error = "Command for {}:{} failed: {}".format(source, command, e)
error = f"Command for {source}:{command} failed: {e}"
logger.warning(error)
abort(500, error)
@@ -297,7 +297,7 @@ def _get_custom_command_specs():
action = spec["action"]
if action == "divider":
dividers += 1
action = "divider_{}".format(dividers)
action = f"divider_{dividers}"
specs[action] = copied
return specs