469 checksum (i.e. cannot be checked) or we are using the limited |
469 checksum (i.e. cannot be checked) or we are using the limited |
470 EasyList (because we fiddled with the original). |
470 EasyList (because we fiddled with the original). |
471 @rtype bool |
471 @rtype bool |
472 """ |
472 """ |
473 try: |
473 try: |
474 f = open(fileName, "r", encoding="utf-8") |
474 with open(fileName, "r", encoding="utf-8") as f: |
475 data = f.read() |
475 data = f.read() |
476 f.close() |
|
477 except (IOError, OSError): |
476 except (IOError, OSError): |
478 return False |
477 return False |
479 |
478 |
480 match = re.search(self.__checksumRe, data) |
479 match = re.search(self.__checksumRe, data) |
481 if match: |
480 if match: |