diff --git a/followingCalendar.py b/followingCalendar.py index 7914a9a87..3535af6be 100644 --- a/followingCalendar.py +++ b/followingCalendar.py @@ -22,16 +22,17 @@ def _text_in_file2(text: str, filename: str, """ if not case_sensitive: text = text.lower() + content = '' try: with open(filename, 'r', encoding='utf-8') as fp_file: content = fp_file.read() - if content: - if not case_sensitive: - content = content.lower() - if text in content: - return True except OSError: print('EX: unable to find text in missing file 2 ' + filename) + if content: + if not case_sensitive: + content = content.lower() + if text in content: + return True return False