示例#1
0
            help(prog_name)
        else:
            print ">>> ", "unhandled option", o
            help(prog_name)

    if directory == "" or not os.path.exists(directory):
        print ">>> path <" + directory + "> may not exist"
        help(prog_name)

    fjrs = fp.get_fjrs(directory)
    for f in fjrs:
        if not quiet:
            print ">>> ", "processing fjr", f

        # parse fjr
        try:
            doc = fp.parse_xml(f)
        except:
            if not quiet:
                print ">>> ", 'FrameworkJobReport', f, 'could not be parsed and is skipped'
            continue

        # if the job finished successfully get the PFN
        try:
            if fp.is_goodfile(doc):
                (lfn, pfn, surl) = fp.get_filenames(doc)
                print pfn
        except:
            if not quiet:
                print ">>> ", "skipping fjr", f
示例#2
0
            help(prog_name)
        else:
            print ">>> ", "unhandled option", o
            help(prog_name)

    if directory == "" or not os.path.exists(directory):
        print ">>> path <" + directory + "> may not exist"
        help(prog_name)

    fjrs = fp.get_fjrs(directory)
    for f in fjrs:
        if not quiet:
            print ">>> ", "processing fjr", f

        # parse fjr
        try:
            doc = fp.parse_xml(f)
        except:
            if not quiet:
                print ">>> ", "FrameworkJobReport", f, "could not be parsed and is skipped"
            continue

        # if the job finished successfully get the PFN
        try:
            if fp.is_goodfile(doc):
                (lfn, pfn, surl) = fp.get_filenames(doc)
                print pfn
        except:
            if not quiet:
                print ">>> ", "skipping fjr", f
示例#3
0
      help(prog_name)

  if directory == "" or not os.path.exists(directory):
    print ">>> path <" + directory + "> may not exist"
    help(prog_name)

  list_stageout = []
  list_not_stageout = []
    
  fjrs = fp.get_fjrs(directory)
  for j in fjrs:
    if not quiet:
      print ">>> processing fjr", j

    try:
      doc = fp.parse_xml(j) # read xml file to see if the job failed
    except Exception, err:
      print ">>> skipping fjr " + j + '; error: ' + str(err)
      continue

    try:
      if fp.has_local_stageout(doc) : 
        if not quiet:
          print ">>> fjr <" + j + "> indicates remote stageout failure with local copy"
        copy_local_to_remote_pfn(doc, directory)
        if not dryrun and not copy_to_ui:
          fp.rewrite_fjr(j, doc)
      else:
        list_not_stageout.append(j)
        if not quiet:
          print ">>> fjr <" + j + ">, no need for local-to-remote copy"