(page, headers, code=None, getRatioValue=False, pageLength=None)
| 35 | from thirdparty import six |
| 36 | |
| 37 | def comparison(page, headers, code=None, getRatioValue=False, pageLength=None): |
| 38 | if not isinstance(page, (six.text_type, six.binary_type, type(None))): |
| 39 | logger.critical("got page of type %s; repr(page)[:200]=%s" % (type(page), repr(page)[:200])) |
| 40 | |
| 41 | try: |
| 42 | page = b"".join(page) |
| 43 | except: |
| 44 | page = six.text_type(page) |
| 45 | |
| 46 | _ = _adjust(_comparison(page, headers, code, getRatioValue, pageLength), getRatioValue) |
| 47 | return _ |
| 48 | |
| 49 | def _adjust(condition, getRatioValue): |
| 50 | if not any((conf.string, conf.notString, conf.regexp, conf.code)): |
searching dependent graphs…