From ad55f02bfb9585f057d7ff0a00f34200bfb49d1e Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Fri, 18 Jun 2021 18:26:55 -0400 Subject: [PATCH] Format all python with black, and add a .vscode folder --- .vscode/settings.json | 3 +++ torbrowser_launcher/launcher.py | 11 +++++------ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..de288e1 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.formatting.provider": "black" +} \ No newline at end of file diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py index 3d0898e..70f309e 100644 --- a/torbrowser_launcher/launcher.py +++ b/torbrowser_launcher/launcher.py @@ -551,12 +551,11 @@ class DownloadThread(QtCore.QThread): self.path = path # Use tor socks5 proxy, if enabled - if self.common.settings['download_over_tor']: - socks5_address = 'socks5h://{}'.format(self.common.settings['tor_socks_address']) - self.proxies = { - 'https': socks5_address, - 'http': socks5_address - } + if self.common.settings["download_over_tor"]: + socks5_address = "socks5h://{}".format( + self.common.settings["tor_socks_address"] + ) + self.proxies = {"https": socks5_address, "http": socks5_address} else: self.proxies = None