#NEWLINE# @ property #NEWLINE# def real_pathspec( self ) : #NEWLINE# #INDENT# 'Returns a pathspec for an aff4 object even if there is none stored.' #NEWLINE# pathspec = self . Get ( new_path . Schema . PATHSPEC ) #NEWLINE# stripped_components = [ ] #NEWLINE# parent = self #NEWLINE# while ( ( not pathspec ) and ( len ( parent . urn . Split ( ) ) > 1 ) ) : #NEWLINE# #INDENT# stripped_components . append ( parent . urn . Basename ( ) ) #NEWLINE# pathspec = parent . Get ( parent . Schema . PATHSPEC ) #NEWLINE# parent = FACTORY . Open ( parent . urn . Dirname ( ) , token = self . token ) #NEWLINE# #UNINDENT# if pathspec : #NEWLINE# #INDENT# if stripped_components : #NEWLINE# #INDENT# new_path = utils . JoinPath ( * reversed ( stripped_components [ : ( - 1 ) ] ) ) #NEWLINE# pathspec . Append ( rdf_paths . PathSpec ( path = new_path , pathtype = pathspec . last . pathtype ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# raise IOError ( 'Item has no pathspec.' ) #NEWLINE# #UNINDENT# return pathspec