[Pkg-privacy-commits] [torbrowser-launcher] 230/476: make tor settings checkbox default to the right value, set environment vars both os.environ as well as os.putenv, and made updating without tor work as well

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:21:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository torbrowser-launcher.

commit a71e3be405a5853635ce9a79c9efeb4aaf0d5d8b
Author: Micah Lee <micah at micahflee.com>
Date:   Mon Jul 7 17:55:58 2014 -0700

    make tor settings checkbox default to the right value, set environment vars both os.environ as well as os.putenv, and made updating without tor work as well
---
 torbrowser-launcher | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/torbrowser-launcher b/torbrowser-launcher
index 4afa0f8..4ca33fa 100755
--- a/torbrowser-launcher
+++ b/torbrowser-launcher
@@ -430,6 +430,7 @@ class TBLSettings:
 
         # Set callback for system tor and update over tor
         self.system_tor_checkbox.connect('clicked', self.on_system_tor_clicked)
+        self.on_system_tor_clicked(None)
 
         # check for updates
         self.update_checkbox = gtk.CheckButton(_("Check for updates next launch"))
@@ -598,6 +599,11 @@ class TBLLauncher:
             os.putenv("TOR_SKIP_LAUNCH", "1")
             os.putenv("TOR_SOCKS_HOST", "127.0.0.1")
             os.putenv("TOR_SOCKS_PORT", "9050")
+            # need to manually set os.environ because os.putenv doesn't update it
+            # https://docs.python.org/2/library/os.html#os.putenv
+            os.environ["TOR_SKIP_LAUNCH"] = "1"
+            os.environ["TOR_SOCKS_HOST"] = "127.0.0.1"
+            os.environ["TOR_SOCKS_PORT"] = "9050"
 
         try:
             import txsocksx
@@ -973,7 +979,7 @@ class TBLLauncher:
         self.progressbar.show()
         self.refresh_gtk()
 
-        if self.common.settings['update_over_tor']:
+        if self.common.settings['use_system_tor'] and self.common.settings['update_over_tor']:
             from twisted.internet.endpoints import TCP4ClientEndpoint 
             from txsocksx.http import SOCKS5Agent
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/torbrowser-launcher.git



More information about the Pkg-privacy-commits mailing list