Functions | Variables
fnal Namespace Reference

Functions

def FetchLog (logfilename)
 

Variables

 samweb
 
 dh
 

Function Documentation

def fnal.FetchLog (   logfilename)

Definition at line 10 of file fnal.py.

References print.

10 def FetchLog(logfilename):
11  global dh, samweb
12  if not samweb:
13  samweb = samweb_client.SAMWebClient(experiment='nova')
14  if not dh:
15  dh = ifdh.ifdh("http://samweb.fnal.gov:8480/sam/nova/api")
16  try:
17  if not os.path.exists(logfilename):
18  print(logfilename)
19  path = samweb.locateFile(logfilename)[0]['full_path'].replace("enstore:","")
20  #print "Fetching", os.path.join(path, logfilename), "for", name
21  dh.cp(["-D", os.path.join(path, logfilename), "./"])
22  return logfilename
23 
25  print("Did not find", logfilename)
26  except socket.error:
27  print("Connection trouble in", logfilename)
28 
29 
def FetchLog(logfilename)
Definition: fnal.py:10
bool print

Variable Documentation

fnal.dh

Definition at line 8 of file fnal.py.

fnal.samweb

Definition at line 7 of file fnal.py.