[Pkg-privacy-commits] [onionshare] 48/55: Move imports to module level

Ulrike Uhlig u-guest at moszumanska.debian.org
Thu Sep 8 10:27:44 UTC 2016


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

u-guest pushed a commit to branch debian
in repository onionshare.

commit 76937d5cb5d0171f9cc2bcadfb0f60c38450256c
Author: Micah Lee <micah at micahflee.com>
Date:   Tue Sep 6 13:17:55 2016 -0700

    Move imports to module level
---
 onionshare/web.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/onionshare/web.py b/onionshare/web.py
index 259bad1..b8c9f04 100644
--- a/onionshare/web.py
+++ b/onionshare/web.py
@@ -17,7 +17,7 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 """
-import queue, mimetypes, platform, os, sys
+import queue, mimetypes, platform, os, sys, socket, logging
 from urllib.request import urlopen
 from flask import Flask, Response, request, render_template_string, abort
 
@@ -136,8 +136,6 @@ def debug_mode():
     """
     Turn on debugging mode, which will log flask errors to a debug file.
     """
-    import logging
-
     if platform.system() == 'Windows':
         temp_dir = os.environ['Temp'].replace('\\', '/')
     else:
@@ -360,8 +358,6 @@ def stop(port):
     # to stop flask, load http://127.0.0.1:<port>/<shutdown_slug>/shutdown
     try:
         if transparent_torification:
-            import socket
-
             s = socket.socket()
             s.connect(('127.0.0.1', port))
             s.sendall('GET /{0:s}/shutdown HTTP/1.1\r\n\r\n'.format(shutdown_slug))

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