mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-06 16:35:03 -04:00
Replace .format with python 3.6 f-strings in onionshare_gui module
This commit is contained in:
parent
b9a7361d9c
commit
3a2cc8bdee
9 changed files with 42 additions and 75 deletions
|
@ -655,22 +655,15 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||
)
|
||||
|
||||
if event["type"] == Web.REQUEST_OTHER:
|
||||
if event["path"] != "/favicon.ico" and event[
|
||||
"path"
|
||||
] != "/{}/shutdown".format(mode.web.shutdown_password):
|
||||
self.status_bar.showMessage(
|
||||
"{0:s}: {1:s}".format(
|
||||
strings._("other_page_loaded"), event["path"]
|
||||
)
|
||||
)
|
||||
if (
|
||||
event["path"] != "/favicon.ico"
|
||||
and event["path"] != f"/{mode.web.shutdown_password}/shutdown"
|
||||
):
|
||||
self.status_bar.showMessage(f"{strings._("other_page_loaded")}: {event["path"]}")
|
||||
|
||||
if event["type"] == Web.REQUEST_INVALID_PASSWORD:
|
||||
self.status_bar.showMessage(
|
||||
"[#{0:d}] {1:s}: {2:s}".format(
|
||||
mode.web.invalid_passwords_count,
|
||||
strings._("incorrect_password"),
|
||||
event["data"],
|
||||
)
|
||||
f"[#{mode.web.invalid_passwords_count}] {strings._('incorrect_password')}: {event['data']}"
|
||||
)
|
||||
|
||||
mode.timer_callback()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue