mirror of https://github.com/tLDP/python-tldp
require exact signature match; stop with .lower()
was comparing for case insensitive matches when locating signatures; probably a bad idea; better to simply require an exact match
This commit is contained in:
parent
853aec028b
commit
b30e2af282
|
@ -44,10 +44,10 @@ class SignatureChecker(object):
|
|||
@classmethod
|
||||
def signatureLocation(cls, f):
|
||||
f.seek(0)
|
||||
buf = f.read(1024).lower()
|
||||
buf = f.read(1024)
|
||||
for sig in cls.signatures:
|
||||
try:
|
||||
sindex = buf.index(sig.lower())
|
||||
sindex = buf.index(sig)
|
||||
logger.debug("YES FOUND signature %r in %s at %s; doctype %s.",
|
||||
sig, f.name, sindex, cls)
|
||||
return sindex
|
||||
|
|
Loading…
Reference in New Issue