mirror of https://github.com/tLDP/python-tldp
method .index removed from Python3 string module; not needed anyway
This commit is contained in:
parent
7affd10e0c
commit
85b8df5e86
|
@ -2,7 +2,6 @@
|
|||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import string
|
||||
from ..utils import logger
|
||||
|
||||
|
||||
|
@ -11,10 +10,10 @@ class SignatureChecker(object):
|
|||
@classmethod
|
||||
def signatureLocation(cls, f):
|
||||
f.seek(0)
|
||||
buf = f.read(1024)
|
||||
buf = f.read(1024).lower()
|
||||
for sig in cls.signatures:
|
||||
try:
|
||||
sindex = string.index(buf.lower(), sig.lower())
|
||||
sindex = buf.index(sig.lower())
|
||||
logger.debug("Found signature %s in %s at %s; doctype %s.",
|
||||
sig, f.name, sindex, cls)
|
||||
return sindex
|
||||
|
|
Loading…
Reference in New Issue