File: Catch-SyntaxError-when-reading-a-h5py-file.patch

package info (click to toggle)
yt 4.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 18,084 kB
  • sloc: python: 132,484; ansic: 5,628; cpp: 1,588; javascript: 352; makefile: 138; sh: 43; csh: 36
file content (24 lines) | stat: -rw-r--r-- 945 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Ole Streicher <olebole@debian.org>
Date: Wed, 17 Nov 2021 13:48:33 +0100
Subject: Catch SyntaxError when reading a h5py file

On 32-bit archs, this otherwise creates a failure on test_non_square_frb

https://github.com/yt-project/yt/issues/3675
---
 yt/frontends/ytdata/data_structures.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/yt/frontends/ytdata/data_structures.py b/yt/frontends/ytdata/data_structures.py
index 17c1261..6f887d0 100644
--- a/yt/frontends/ytdata/data_structures.py
+++ b/yt/frontends/ytdata/data_structures.py
@@ -61,6 +61,8 @@ class SavedDataset(Dataset):
                         # results from having the eval do a concatenated decoded
                         # set of the values.
                         v = [_.decode("utf8") for _ in v]
+                    except SyntaxError:
+                        pass
                 self.parameters[key] = v
             self._with_parameter_file_open(f)