SHA256
1
0
forked from pool/python-pypet
Files
python-pypet/do-not-decode-int.patch
Steve Kowalik acc26ba476 - Update to 0.6.1:
* Support for NumPy >= 1.20
- Drop patch support-numpy-1.20.patch, included upstream.
- Add patch do-not-decode-int.patch, do not call .decode() on ints
  when storing them.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pypet?expand=0&rev=12
2023-06-20 02:05:27 +00:00

15 lines
783 B
Diff

Index: pypet-0.6.1/pypet/storageservice.py
===================================================================
--- pypet-0.6.1.orig/pypet/storageservice.py
+++ pypet-0.6.1/pypet/storageservice.py
@@ -3175,7 +3175,8 @@ class HDF5StorageService(StorageService,
# in the list or tuple
for idx, item in enumerate(data):
if typestr == str.__name__:
- data[idx] = data[idx].decode(self._encoding)
+ if hasattr(data[idx], "decode"):
+ data[idx] = data[idx].decode(self._encoding)
else:
try:
data[idx] = pypetconstants.PARAMETERTYPEDICT[typestr](item)