Minor cruft removal.

This commit is contained in:
Aldo Cortesi 2012-04-09 11:42:56 +12:00
parent d7748cea4f
commit 24a8dc408c
7 changed files with 6 additions and 10 deletions

View File

@ -2,7 +2,6 @@ import os, ssl, hashlib, socket, time, datetime
from pyasn1.type import univ, constraint, char, namedtype, tag from pyasn1.type import univ, constraint, char, namedtype, tag
from pyasn1.codec.der.decoder import decode from pyasn1.codec.der.decoder import decode
import OpenSSL import OpenSSL
import utils
CERT_SLEEP_TIME = 1 CERT_SLEEP_TIME = 1
CERT_EXPIRY = str(365 * 3) CERT_EXPIRY = str(365 * 3)
@ -98,7 +97,6 @@ def dummy_cert(certdir, ca, commonname, sans):
else: else:
key, ca = create_ca() key, ca = create_ca()
pkey = ca.get_pubkey()
req = OpenSSL.crypto.X509Req() req = OpenSSL.crypto.X509Req()
subj = req.get_subject() subj = req.get_subject()
subj.CN = commonname subj.CN = commonname

View File

@ -14,7 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import proxy import proxy
import optparse, re, filt, textwrap import optparse, re, filt
class ParseReplaceException(Exception): pass class ParseReplaceException(Exception): pass

View File

@ -127,7 +127,7 @@ def view_xml(hdrs, content, limit):
parser = lxml.etree.XMLParser(remove_blank_text=True, resolve_entities=False, strip_cdata=False, recover=False) parser = lxml.etree.XMLParser(remove_blank_text=True, resolve_entities=False, strip_cdata=False, recover=False)
try: try:
document = lxml.etree.fromstring(content, parser) document = lxml.etree.fromstring(content, parser)
except lxml.etree.XMLSyntaxError, v: except lxml.etree.XMLSyntaxError:
return None return None
docinfo = document.getroottree().docinfo docinfo = document.getroottree().docinfo

View File

@ -15,7 +15,6 @@
import urwid import urwid
import common import common
from .. import filt, version
footer = [ footer = [
('heading_key', "q"), ":back ", ('heading_key', "q"), ":back ",

View File

@ -13,10 +13,10 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import os, re, sys import os, sys
import urwid import urwid
import common, grideditor, contentview import common, grideditor, contentview
from .. import utils, encoding, flow from .. import utils, flow
def _mkhelp(): def _mkhelp():
text = [] text = []

View File

@ -40,7 +40,6 @@
""" """
import re, sys import re, sys
import contrib.pyparsing as pp import contrib.pyparsing as pp
import flow
class _Token: class _Token:

View File

@ -12,8 +12,8 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import re, os, datetime, urlparse, string, urllib import os, datetime, urlparse, string, urllib
import time, functools, cgi, textwrap import time, functools, cgi
import json import json
def timestamp(): def timestamp():