[Pkg-anonymity-tools] [onionshare] 22/57: pep8: too long lines, reformat lines to < 120 chars. removed redundancy from long_description in setup.py.
Ulrike Uhlig
u-guest at moszumanska.debian.org
Tue May 19 18:18:55 UTC 2015
This is an automated email from the git hooks/post-receive script.
u-guest pushed a commit to annotated tag 0.7
in repository onionshare.
commit 087102bde4ba857b261da269855151ae4beda3a1
Author: Thomas Waldmann <tw at waldmann-edv.de>
Date: Tue Nov 18 18:59:48 2014 +0100
pep8: too long lines, reformat lines to < 120 chars. removed redundancy from long_description in setup.py.
note: pep8 usually recommends 80 chars, but I find that impractical and unnecessary - it's not 1980 any more when code was edited on 80x25 terminals.
i was a bit wondering about onionshare-launcher.py - it does a lot of imports, but does not use the imported names.
---
onionshare/onionshare.py | 6 ++++--
onionshare_gui/file_selection.py | 6 ++++--
setup.py | 16 ++++++++++++++--
setup/onionshare-launcher.py | 4 +++-
test/onionshare_helpers_test.py | 3 ++-
5 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/onionshare/onionshare.py b/onionshare/onionshare.py
index 28744d2..d7f13fb 100644
--- a/onionshare/onionshare.py
+++ b/onionshare/onionshare.py
@@ -212,7 +212,8 @@ def tails_root():
sys.exit(-1)
# open hole in firewall
- subprocess.call(['/sbin/iptables', '-I', 'OUTPUT', '-o', 'lo', '-p', 'tcp', '--dport', str(port), '-j', 'ACCEPT'])
+ subprocess.call(['/sbin/iptables', '-I', 'OUTPUT', '-o', 'lo',
+ '-p', 'tcp', '--dport', str(port), '-j', 'ACCEPT'])
# start hidden service
app = OnionShare()
@@ -226,7 +227,8 @@ def tails_root():
import signal
def handler(signum=None, frame=None):
- subprocess.call(['/sbin/iptables', '-D', 'OUTPUT', '-o', 'lo', '-p', 'tcp', '--dport', str(port), '-j', 'ACCEPT'])
+ subprocess.call(['/sbin/iptables', '-D', 'OUTPUT', '-o', 'lo',
+ '-p', 'tcp', '--dport', str(port), '-j', 'ACCEPT'])
sys.exit()
for sig in [signal.SIGTERM, signal.SIGINT, signal.SIGHUP, signal.SIGQUIT]:
signal.signal(sig, handler)
diff --git a/onionshare_gui/file_selection.py b/onionshare_gui/file_selection.py
index e890140..89d2e56 100644
--- a/onionshare_gui/file_selection.py
+++ b/onionshare_gui/file_selection.py
@@ -188,14 +188,16 @@ class FileSelection(QtGui.QVBoxLayout):
self.file_list.update()
def add_files(self):
- filenames = QtGui.QFileDialog.getOpenFileNames(caption=strings._('gui_choose_files', True), options=QtGui.QFileDialog.ReadOnly)
+ filenames = QtGui.QFileDialog.getOpenFileNames(
+ caption=strings._('gui_choose_files', True), options=QtGui.QFileDialog.ReadOnly)
if filenames:
for filename in filenames:
self.file_list.add_file(str(filename))
self.update()
def add_dir(self):
- filename = QtGui.QFileDialog.getExistingDirectory(caption=strings._('gui_choose_folder', True), options=QtGui.QFileDialog.ReadOnly)
+ filename = QtGui.QFileDialog.getExistingDirectory(
+ caption=strings._('gui_choose_folder', True), options=QtGui.QFileDialog.ReadOnly)
if filename:
self.file_list.add_file(str(filename))
self.update()
diff --git a/setup.py b/setup.py
index 1ef27cc..6e79719 100644
--- a/setup.py
+++ b/setup.py
@@ -38,11 +38,23 @@ def file_list(path):
version = open('version').read().strip()
+description = (
+ """OnionShare lets you securely and anonymously share a file of any size with someone. """
+ """It works by starting a web server, making it accessible as a Tor hidden service, """
+ """and generating an unguessable URL to access and download the file.""")
+
+long_description = description + " " + (
+ """It doesn't require setting up a server on the internet somewhere or using a third """
+ """party filesharing service. You host the file on your own computer and use a Tor """
+ """hidden service to make it temporarily accessible over the internet. The other user """
+ """just needs to use Tor Browser to download the file from you."""
+)
+
setup(
name='onionshare',
version=version,
- description='OnionShare lets you securely and anonymously share a file of any size with someone. It works by starting a web server, making it accessible as a Tor hidden service, and generating an unguessable URL to access and download the file.',
- long_description="""OnionShare lets you securely and anonymously share a file of any size with someone. It works by starting a web server, making it accessible as a Tor hidden service, and generating an unguessable URL to access and download the file. It doesn't require setting up a server on the internet somewhere or using a third party filesharing service. You host the file on your own computer and use a Tor hidden service to make it temporarily accessible over the internet. The ot [...]
+ description=description,
+ long_description=long_description,
author='Micah Lee',
author_email='micah at micahflee.com',
url='https://github.com/micahflee/onionshare',
diff --git a/setup/onionshare-launcher.py b/setup/onionshare-launcher.py
index fe3a424..6a6a162 100644
--- a/setup/onionshare-launcher.py
+++ b/setup/onionshare-launcher.py
@@ -18,7 +18,9 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from __future__ import division
-import os, sys, subprocess, time, hashlib, platform, json, locale, socket, argparse, Queue, inspect, base64, random, functools, logging, ctypes, hmac, shutil
+import os, sys, subprocess, time, hashlib, platform, json, locale, socket
+import argparse, Queue, inspect, base64, random, functools, logging, ctypes
+import hmac, shutil
from itertools import izip
import stem, stem.control, flask
from PyQt4 import QtCore, QtGui
diff --git a/test/onionshare_helpers_test.py b/test/onionshare_helpers_test.py
index 1c7c42d..ab21b9e 100644
--- a/test/onionshare_helpers_test.py
+++ b/test/onionshare_helpers_test.py
@@ -24,7 +24,8 @@ import test_helpers
def test_get_platform_on_tails():
"""get_platform() returns 'Tails' when hostname is 'amnesia'"""
- helpers.platform.uname = lambda: ('Linux', 'amnesia', '3.14-1-amd64', '#1 SMP Debian 3.14.4-1 (2014-05-13)', 'x86_64', '')
+ helpers.platform.uname = lambda: ('Linux', 'amnesia', '3.14-1-amd64',
+ '#1 SMP Debian 3.14.4-1 (2014-05-13)', 'x86_64', '')
assert helpers.get_platform() == 'Tails'
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/onionshare.git
More information about the Pkg-anonymity-tools
mailing list