def cleanup_mode(mode):
 if stat.S_ISLNK(mode):
  return stat.S_IFLNK
 elif stat.S_ISDIR(mode):
  return stat.S_IFDIR
 elif S_ISGITLINK(mode):
  return S_IFGITLINK
 ret = (stat.S_IFREG | 420)
 ret |= (mode & 73)
 return ret

def cleanup_mode ( mode ) : if stat . S_ISLNK ( mode ) : return stat . S_IFLNK elif stat . S_ISDIR ( mode ) : return stat . S_IFDIR elif S_ISGITLINK ( mode ) : return S_IFGITLINK ret = ( stat . S_IFREG | 420 ) ret |= ( mode & 73 ) return ret
cleanup a mode value .