From 2f86a2a44b855c9520a4a47688f3f7c634ac81f0 Mon Sep 17 00:00:00 2001 From: pictuga Date: Tue, 7 Apr 2015 09:49:44 +0800 Subject: [PATCH] Remove useless obscure cgi code --- morss/morss.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/morss/morss.py b/morss/morss.py index a7baa9b..375adf4 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -24,14 +24,14 @@ from html2text import HTML2Text try: from Queue import Queue - from httplib import HTTPConnection, HTTPException + from httplib import HTTPException from urllib2 import build_opener from urllib2 import HTTPError from urllib import quote_plus from urlparse import urlparse, urljoin, parse_qs except ImportError: from queue import Queue - from http.client import HTTPConnection, HTTPException + from http.client import HTTPException from urllib.request import build_opener from urllib.error import HTTPError from urllib.parse import quote_plus @@ -57,13 +57,6 @@ MIMETYPE = { PROTOCOL = ['http', 'https', 'ftp'] -if 'SCRIPT_NAME' in os.environ: - HTTPConnection.debuglevel = 1 - - import cgitb - - cgitb.enable() - def filterOptions(options): return options