File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -708,14 +708,18 @@ def getNumLinksToObject(self, obj):
708
708
709
709
def getUUIDByPath (self , path ):
710
710
self .initFile ()
711
- self .log .info ("getUUIDByPath: [" + path + "]" )
711
+ self .log .info ("getUUIDByPath: [[[ " + path + "]" )
712
712
if len (path ) >= 6 and path [:6 ] == '__db__' :
713
713
msg = "getUUIDByPath called with invalid path: [" + path + "]"
714
714
self .log .error (msg )
715
715
raise IOError (errno .EIO , msg )
716
716
if path == '/' :
717
717
# just return the root UUID
718
- return self .dbGrp .attrs ["rootUUID" ]
718
+ root_uuid = self .dbGrp .attrs ["rootUUID" ]
719
+ if root_uuid and type (root_uuid ) is not str :
720
+ # convert bytes to unicode
721
+ root_uuid = root_uuid .decode ('utf-8' )
722
+ return root_uuid
719
723
720
724
obj = self .f [path ] # will throw KeyError if object doesn't exist
721
725
addr = h5py .h5o .get_info (obj .id ).addr
You can’t perform that action at this time.
0 commit comments