[Pkg-privacy-commits] [torbrowser-launcher] 37/59: Merge branch 'feature-print-function' of https://github.com/sedrubal/torbrowser-launcher into sedrubal-feature-print-function

Roger Shimizu rogershimizu at gmail.com
Mon Jan 29 13:43:59 UTC 2018


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

rosh pushed a commit to branch debian/sid
in repository torbrowser-launcher.

commit 49c7ae49e6bdb88fae46a9aae86b64382a3cf692
Merge: 4ce1438 bace7de
Author: Micah Lee <micah at micahflee.com>
Date:   Sun Jan 28 08:24:55 2018 -0800

    Merge branch 'feature-print-function' of https://github.com/sedrubal/torbrowser-launcher into sedrubal-feature-print-function

 torbrowser_launcher/__init__.py | 10 ++++++----
 torbrowser_launcher/common.py   | 14 ++++++++------
 torbrowser_launcher/launcher.py | 33 +++++++++++++++++----------------
 3 files changed, 31 insertions(+), 26 deletions(-)

diff --cc torbrowser_launcher/common.py
index 0eefbd7,c131053..f1cbadc
--- a/torbrowser_launcher/common.py
+++ b/torbrowser_launcher/common.py
@@@ -26,20 -26,9 +26,22 @@@ FROM, OUT OF OR IN CONNECTION WITH THE 
  OTHER DEALINGS IN THE SOFTWARE.
  """
  
+ from __future__ import print_function
+ 
 -import os, sys, platform, subprocess, locale, pickle, json, psutil, re
 +import os
 +import sys
 +import platform
 +import subprocess
 +import locale
 +import pickle
 +import json
 +import re
 +
 +try:
 +    import gpg
 +    gpgme_support = True
 +except ImportError:
 +    gpgme_support = False
  
  import pygtk
  pygtk.require('2.0')
@@@ -190,13 -179,13 +192,13 @@@ class Common
      def mkdir(path):
          try:
              if not os.path.exists(path):
 -                os.makedirs(path, 0700)
 +                os.makedirs(path, 0o700)
                  return True
          except:
-             print _("Cannot create directory {0}").format(path)
+             print(_("Cannot create directory {0}").format(path))
              return False
          if not os.access(path, os.W_OK):
-             print _("{0} is not writable").format(path)
+             print(_("{0} is not writable").format(path))
              return False
          return True
  
@@@ -291,9 -244,8 +293,9 @@@
                  all_imports_succeeded = False
  
          if not all_imports_succeeded:
-             print _('Not all keys were imported successfully!')
+             print(_('Not all keys were imported successfully!'))
  
 +        self.refresh_keyring()
          return all_imports_succeeded
  
      # load mirrors
diff --cc torbrowser_launcher/launcher.py
index 45a607c,660b302..eca7d51
--- a/torbrowser_launcher/launcher.py
+++ b/torbrowser_launcher/launcher.py
@@@ -26,17 -26,9 +26,19 @@@ FROM, OUT OF OR IN CONNECTION WITH THE 
  OTHER DEALINGS IN THE SOFTWARE.
  """
  
+ from __future__ import print_function
+ 
 -import os, subprocess, time, json, tarfile, hashlib, lzma, threading, re, unicodedata
 +import os
 +import subprocess
 +import time
 +import json
 +import tarfile
 +import hashlib
 +import lzma
 +import threading
 +import re
 +import unicodedata
 +
  from twisted.internet import reactor
  from twisted.web.client import Agent, RedirectAgent, ResponseDone, ResponseFailed
  from twisted.web.http_headers import Headers
@@@ -300,7 -280,7 +301,7 @@@ class Launcher
                  self.download('tarball', self.common.paths['tarball_url'], self.common.paths['tarball_file'])
  
          elif task == 'verify':
-             print _('Verifying Signature')
 -            print(_('Verifying signature'))
++            print(_('Verifying Signature'))
              self.verify()
  
          elif task == 'extract':
@@@ -382,11 -348,11 +383,11 @@@
              self.run_task()
  
          else:
-             print "FINISHED", msg
-             # FIXME handle errors
+             print("FINISHED", msg)
+             ## FIXME handle errors
  
      def download_error(self, f):
-         print _("Download Error:"), f.value, type(f.value)
 -        print(_("Download error:"), f.value, type(f.value))
++        print(_("Download Error:"), f.value, type(f.value))
  
          if isinstance(f.value, TryStableException):
              f.trap(TryStableException)
@@@ -613,9 -547,8 +614,9 @@@
      def run(self, run_next_task=True):
          # don't run if it isn't at least the minimum version
          if not self.check_min_version():
 -            message =  _("The version of Tor Browser you have installed is earlier than it should be, which could be a sign of an attack!")
 +            message = _("The version of Tor Browser you have installed is earlier than it should be, which could be a "
 +                        "sign of an attack!")
-             print message
+             print(message)
  
              md = gtk.MessageDialog(None, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_WARNING, gtk.BUTTONS_CLOSE, _(message))
              md.set_position(gtk.WIN_POS_CENTER)

-- 
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