Skip to content

Commit 2be48aa

Browse files
committed
debug fluidfoam/readof
1 parent d29cd2d commit 2be48aa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fluidfoam/readof.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,14 @@ def __init__(
112112

113113
try:
114114
self.is_ascii = self.header[b"format"] == b"ascii"
115-
self.is_SP = b"scalar=32" in self.header[b"arch"]
116115
self.noheader = False
117116
except KeyError:
118117
self.is_ascii = True
119-
self.is_SP = False
120118
self.noheader = True
119+
try:
120+
self.is_SP = b"scalar=32" in self.header[b"arch"]
121+
except KeyError:
122+
self.is_SP = False
121123

122124
for line in self.lines_stripped:
123125
if line.startswith(b"dimensions"):

0 commit comments

Comments
 (0)