mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-07 08:55:12 -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
|
@ -86,7 +86,7 @@ class TorConnectionDialog(QtWidgets.QProgressDialog):
|
|||
def _tor_status_update(self, progress, summary):
|
||||
self.setValue(int(progress))
|
||||
self.setLabelText(
|
||||
"<strong>{}</strong><br>{}".format(strings._("connecting_to_tor"), summary)
|
||||
f"<strong>{strings._("connecting_to_tor")}</strong><br>{summary}"
|
||||
)
|
||||
|
||||
def _connected_to_tor(self):
|
||||
|
@ -112,7 +112,7 @@ class TorConnectionDialog(QtWidgets.QProgressDialog):
|
|||
# Display the exception in an alert box
|
||||
Alert(
|
||||
self.common,
|
||||
"{}\n\n{}".format(msg, strings._("gui_tor_connection_error_settings")),
|
||||
f"{msg}\n\n{strings._("gui_tor_connection_error_settings")}",
|
||||
QtWidgets.QMessageBox.Warning,
|
||||
)
|
||||
|
||||
|
@ -162,7 +162,7 @@ class TorConnectionThread(QtCore.QThread):
|
|||
|
||||
except Exception as e:
|
||||
self.common.log(
|
||||
"TorConnectionThread", "run", "caught exception: {}".format(e.args[0])
|
||||
"TorConnectionThread", "run", f"caught exception: {e.args[0]}"
|
||||
)
|
||||
self.error_connecting_to_tor.emit(str(e.args[0]))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue