Skip to content

Commit ac166a0

Browse files
committed
try/catch for filesystem weirdness
1 parent 65995c1 commit ac166a0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

durdraw/durdraw_sauce.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@ def __init__(self, filename):
5151
self.load_and_parse_file(filename)
5252

5353
def load_and_parse_file(self, filename):
54-
with open(filename, 'rb') as file:
55-
file_blob = file.read()
54+
try:
55+
with open(filename, 'rb') as file:
56+
file_blob = file.read()
57+
except Exception as E:
58+
return False
5659

5760
sauce_blob = file_blob[-128:]
5861
self.sauce_blob = sauce_blob

0 commit comments

Comments
 (0)