def DumpClientYaml(client_urn, target_dir, token=None, overwrite=False):
 fd = aff4.FACTORY.Open(client_urn, aff4_grr.VFSGRRClient, token=token)
 dirpath = os.path.join(target_dir, fd.urn.Split()[0])
 try:
  os.makedirs(dirpath)
 except OSError:
  pass
 filepath = os.path.join(dirpath, 'client_info.yaml')
 if ((not os.path.isfile(filepath)) or overwrite):
  with open(filepath, 'wb') as out_file:
   out_file.write(serialize.YamlDumper(fd))

def DumpClientYaml ( client_urn , target_dir , token = None , overwrite = False ) : fd = aff4 . FACTORY . Open ( client_urn , aff4_grr . VFSGRRClient , token = token ) dirpath = os . path . join ( target_dir , fd . urn . Split ( ) [ 0 ] ) try : os . makedirs ( dirpath ) except OSError : pass filepath = os . path . join ( dirpath , 'client_info.yaml' ) if ( ( not os . path . isfile ( filepath ) ) or overwrite ) : with open ( filepath , 'wb' ) as out_file : out_file . write ( serialize . YamlDumper ( fd ) )
dump a yaml file containing client info .