2 |
|
import urllib |
3 |
|
from xml.dom.minidom import parse |
4 |
|
from crab_exceptions import * |
5 |
– |
from crab_logger import Logger |
5 |
|
from WorkSpace import * |
6 |
|
from urlparse import urlparse |
7 |
|
from LFNBaseName import * |
14 |
|
self.datasvc_url = cfg_params.get("USER.datasvc_url",url) |
15 |
|
|
16 |
|
self.FacOps_savannah = 'https://savannah.cern.ch/support/?func=additem&group=cmscompinfrasup' |
17 |
< |
stage_out_faq='https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCrabFaq#How_to_store_output_with_CRAB_2' |
17 |
> |
stage_out_faq='https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCrabHowTo#Stageout_and_publication' |
18 |
|
self.dataPub_faq = 'https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCrabForPublication' |
19 |
|
|
20 |
|
self.srm_version = cfg_params.get("USER.srm_version",'srmv2') |
32 |
|
msg = 'Warning: lfn has been deprecated, CRAB will ignore it.\n' |
33 |
|
msg += '\t Please use only user_remote_dir removing lfn from your crab.cfg\n' |
34 |
|
msg += '\t For further information please visit : \n\t%s'%stage_out_faq |
35 |
< |
common.logger.message(msg) |
35 |
> |
common.logger.info(msg) |
36 |
|
|
37 |
|
self.datasetpath = cfg_params.get("CMSSW.datasetpath") |
38 |
|
self.publish_data_name = cfg_params.get('USER.publish_data_name','') |
166 |
|
params = {'node' : self.node , 'lfn': self.lfn , 'protocol': self.protocol} |
167 |
|
params = urllib.urlencode(params) |
168 |
|
datasvc_lfn2pfn="%s/lfn2pfn"%self.datasvc_url |
170 |
– |
urlresults = urllib.urlopen(datasvc_lfn2pfn, params) |
169 |
|
try: |
170 |
+ |
urlresults = urllib.urlopen(datasvc_lfn2pfn, params) |
171 |
|
urlresults = parse(urlresults) |
172 |
+ |
except IOError: |
173 |
+ |
msg="Unable to access PhEDEx Data Service at %s"%datasvc_lfn2pfn |
174 |
+ |
raise CrabException(msg) |
175 |
|
except: |
176 |
|
urlresults = None |
177 |
|
|