Skip to content

Commit

Permalink
Fix another instance of byte string
Browse files Browse the repository at this point in the history
  • Loading branch information
jniediek committed Oct 28, 2021
1 parent 12cdf7d commit 91cc425
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion combinato/manager/manager_cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def __init__(self, h5fname):
self.classes = self.h5fid.root.classes[:]
self.groups = self.h5fid.root.groups[:]
self.types = self.h5fid.root.types[:]
self.sign = self.h5fid.get_node_attr('/', 'sign') # .decode()
temp = self.h5fid.get_node_attr('/', 'sign')
self.sign = str(temp, 'utf-8')

This comment has been minimized.

Copy link
@jniediek

jniediek Nov 19, 2021

Author Owner

The str does not always work, depending on the h5fid file was written. This line should be encapsulated by try ... except or by a if type(temp) ....

self.basedir = os.path.dirname(h5fname)
self.matches = self.h5fid.root.matches[:]

Expand Down

0 comments on commit 91cc425

Please sign in to comment.