Replace .format with python 3.6 f-strings in onionshare_gui module

This commit is contained in:
Micah Lee 2019-10-20 10:30:16 -07:00
parent 16bcbbf55d
commit db48e04e65
9 changed files with 42 additions and 75 deletions

View file

@ -540,9 +540,7 @@ class ServerStatus(QtWidgets.QWidget):
Returns the OnionShare URL.
"""
if self.common.settings.get("public_mode"):
url = "http://{0:s}".format(self.app.onion_host)
url = f"http://{self.app.onion_host}"
else:
url = "http://onionshare:{0:s}@{1:s}".format(
self.web.password, self.app.onion_host
)
url = f"http://onionshare:{self.web.password}@{self.app.onion_host}"
return url