1
0
Fork 0
forked from github/pelican

Update code base for Python 3.8 and above

Result of: pipx run pyupgrade --py38-plus pelican/**/*.py
This commit is contained in:
Justin Mayer 2023-11-12 13:53:02 +01:00
commit ecd598f293
15 changed files with 58 additions and 64 deletions

View file

@ -273,7 +273,7 @@ class PrintSettings(argparse.Action):
)
)
else:
console.print("\n{} is not a recognized setting.".format(setting))
console.print(f"\n{setting} is not a recognized setting.")
break
else:
# No argument was given to --print-settings, so print all settings
@ -611,9 +611,7 @@ def listen(server, port, output, excqueue=None):
return
try:
console.print(
"Serving site at: http://{}:{} - Tap CTRL-C to stop".format(server, port)
)
console.print(f"Serving site at: http://{server}:{port} - Tap CTRL-C to stop")
httpd.serve_forever()
except Exception as e:
if excqueue is not None: