[Pkg-privacy-commits] [onionshare] 247/256: Fix indenting

Ulrike Uhlig ulrike at moszumanska.debian.org
Fri May 26 12:53:52 UTC 2017


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

ulrike pushed a commit to branch master
in repository onionshare.

commit befc253d4b4d39d9b92ac9514962cabfbe8dbefe
Author: Micah Lee <micah at micahflee.com>
Date:   Tue May 23 15:16:27 2017 -0700

    Fix indenting
---
 onionshare/common.py   | 8 ++++----
 onionshare/onion.py    | 4 ++--
 onionshare/settings.py | 4 ++--
 onionshare/strings.py  | 4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/onionshare/common.py b/onionshare/common.py
index 58e7b88..cff2224 100644
--- a/onionshare/common.py
+++ b/onionshare/common.py
@@ -95,8 +95,8 @@ def get_version():
     Returns the version of OnionShare that is running.
     """
     with open(get_resource_path('version.txt')) as f:
-      version = f.read().strip()
-      return version
+        version = f.read().strip()
+        return version
 
 
 def constant_time_compare(val1, val2):
@@ -136,8 +136,8 @@ def build_slug():
     Returns a random string made from two words from the wordlist, such as "deter-trig".
     """
     with open(get_resource_path('wordlist.txt')) as f:
-      wordlist = f.read().split('\n')
-      wordlist.remove('')
+        wordlist = f.read().split('\n')
+        wordlist.remove('')
 
     r = SystemRandom()
     return '-'.join(r.choice(wordlist) for x in range(2))
diff --git a/onionshare/onion.py b/onionshare/onion.py
index 8463971..41342b7 100644
--- a/onionshare/onion.py
+++ b/onionshare/onion.py
@@ -179,7 +179,7 @@ class Onion(object):
             else:
                 # Linux and Mac can use unix sockets
                 with open(common.get_resource_path('torrc_template')) as f:
-                  torrc_template = f.read()
+                    torrc_template = f.read()
                 self.tor_control_port = None
                 self.tor_control_socket = os.path.join(self.tor_data_directory.name, 'control_socket')
                 self.tor_cookie_auth_file = os.path.join(self.tor_data_directory.name, 'cookie')
@@ -194,7 +194,7 @@ class Onion(object):
             torrc_template = torrc_template.replace('{{geo_ipv6_file}}',    self.tor_geo_ipv6_file_path)
             torrc_template = torrc_template.replace('{{socks_port}}',       str(self.tor_socks_port))
             with open(self.tor_torrc, 'w') as f:
-              f.write(torrc_template)
+                f.write(torrc_template)
 
             # Execute a tor subprocess
             start_ts = time.time()
diff --git a/onionshare/settings.py b/onionshare/settings.py
index 97c6774..765b96d 100644
--- a/onionshare/settings.py
+++ b/onionshare/settings.py
@@ -86,8 +86,8 @@ class Settings(object):
         if os.path.exists(self.filename):
             try:
                 with open(self.filename, 'r') as f:
-                  self._settings = json.loads(f.read())
-                  self.fill_in_defaults()
+                    self._settings = json.loads(f.read())
+                    self.fill_in_defaults()
             except:
                 pass
 
diff --git a/onionshare/strings.py b/onionshare/strings.py
index 5a499a4..9b26b4b 100644
--- a/onionshare/strings.py
+++ b/onionshare/strings.py
@@ -39,8 +39,8 @@ def load_strings(common, default="en"):
         lang, ext = os.path.splitext(filename)
         if abs_filename.endswith('.json'):
             with open(abs_filename, encoding='utf-8') as f:
-              lang_json = f.read()
-              translations[lang] = json.loads(lang_json)
+                lang_json = f.read()
+                translations[lang] = json.loads(lang_json)
 
     strings = translations[default]
     lc, enc = locale.getdefaultlocale()

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



More information about the Pkg-privacy-commits mailing list