File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -3529,7 +3529,7 @@ def is_um_file(self, filename):
3529
3529
"""
3530
3530
try :
3531
3531
self .file_open (filename )
3532
- except Exception :
3532
+ except Exception as error :
3533
3533
self .file_close ()
3534
3534
return False
3535
3535
else :
@@ -3568,7 +3568,6 @@ def file_open(self, filename):
3568
3568
byte_ordering = g .get ("byte_ordering" ),
3569
3569
word_size = g .get ("word_size" ),
3570
3570
fmt = g .get ("fmt" ),
3571
- parse = True ,
3572
3571
)
3573
3572
3574
3573
Original file line number Diff line number Diff line change 10
10
class UMFileException (Exception ):
11
11
pass
12
12
13
+ # Integer header pointers
14
+ LBLREC = 14
15
+ LBPACK = 20
16
+ LBEGIN = 28
13
17
14
18
class File :
15
19
"""A class for a UM file that gives a view of the file including
@@ -322,7 +326,7 @@ def from_file_and_offsets(
322
326
323
327
if data_offset is None :
324
328
# Calculate the data offset from the integer header
325
- if PP :
329
+ if file . fmt == "PP" :
326
330
# We only support 64-word headers, so the data starts
327
331
# 66 words after the header_offset, i.e. 64 words of the
328
332
# header, plus 2 block control words.
You can’t perform that action at this time.
0 commit comments