forked from docs/doc-exports
Further improve comparator
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: gtema <artem.goncharov@gmail.com> Co-committed-by: gtema <artem.goncharov@gmail.com>
This commit is contained in:
parent
d55a9f77ef
commit
bd27bc574b
@ -35,13 +35,16 @@ class OTCComparator:
|
||||
t1 = original.find(body_filter)
|
||||
t2 = new.find(body_filter)
|
||||
if t1 != t2:
|
||||
if t1.get_text() != t2.get_text():
|
||||
if t1.get_text() == t2.get_text():
|
||||
logging.error(
|
||||
"File %s is not matching, but "
|
||||
"plain text matches" % file_name)
|
||||
return False
|
||||
return True
|
||||
else:
|
||||
logging.error("File %s mismatches" % file_name)
|
||||
logging.debug("Proposed content: %s" % t2.get_text())
|
||||
logging.debug("Current content: %s" % t1.get_text())
|
||||
return False
|
||||
else:
|
||||
logging.info("Content matches")
|
||||
return True
|
||||
|
Loading…
x
Reference in New Issue
Block a user