remove usage of old string methods

This commit is contained in:
Andrew Case
2019-02-26 22:20:33 +00:00
committed by ikelos
parent c5cc88b245
commit c9adc6a0fa
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -257,6 +257,6 @@ class MacUtilities(object):
vnode = f.f_fglob.fg_data.dereference().cast("vnode")
path = vnode.full_path()
else:
path = "<%s>" % ftype.replace("DTYPE_", "").lower()
path = "<{}>".format(ftype.replace("DTYPE_", "").lower())
yield f, path, fd_num
@@ -137,7 +137,7 @@ class vnode(generic.GenericIntelProcess):
def full_path(self):
if self.v_flag & 0x000001 != 0 and self.v_mount != 0 and self.v_mount.mnt_flag & 0x00004000 != 0:
ret = "/"
ret = b"/"
else:
elements = []
files = []
@@ -152,8 +152,7 @@ class vnode(generic.GenericIntelProcess):
if ret:
ret = b"/" + ret
return ret
return ret.decode("utf-8")
class vm_map_entry(generic.GenericIntelProcess):