ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/LFNBaseName.py
(Generate patch)

Comparing COMP/CRAB/python/LFNBaseName.py (file contents):
Revision 1.16 by fanzago, Thu Oct 23 17:07:22 2008 UTC vs.
Revision 1.19 by spiga, Thu Jan 15 18:21:51 2009 UTC

# Line 7 | Line 7 | from crab_exceptions import *
7   from crab_util import runCommand, UnixUserName
8   import common
9   import os, string, time
10 < from ProdCommon.SiteDB.SiteDB import SiteDBJSON
10 > from WMCore.Services.SiteDB.SiteDB import SiteDBJSON
11  
12  
13 < def LFNBase(lfn, PrimaryDataset='',ProcessedDataset='',merged=True,LocalUser=False,publish=False):
13 > def LFNBase(forced_path, PrimaryDataset='',ProcessedDataset='',merged=True,LocalUser=False,publish=False):
14      """
15      """
16      #lfnbase = "/store"
# Line 18 | Line 18 | def LFNBase(lfn, PrimaryDataset='',Proce
18          #lfnbase = os.path.join(lfnbase,"tmp")
19      if (PrimaryDataset == 'null'):
20          PrimaryDataset = ProcessedDataset
21 +    if ( PrimaryDataset[0] == '/' ):  PrimaryDataset=PrimaryDataset[1:]  
22     # lfnbase = os.path.join(lfnbase, "user", getUserName(LocalUser=LocalUser), PrimaryDataset, ProcessedDataset )
23 <    lfnbase = os.path.join(lfn, getUserName(LocalUser=LocalUser), PrimaryDataset, ProcessedDataset)
23 >    lfnbase = os.path.join(forced_path, getUserName(LocalUser=LocalUser), PrimaryDataset, ProcessedDataset)
24  
25      return lfnbase
26  
# Line 90 | Line 91 | def gethnUserName():
91                 nameuser = line
92             userfile.close()
93             nameuser = string.strip(nameuser)
94 <    return nameuser  
94 >    return nameuser
95  
96   def getUserName(LocalUser=False):
97      """

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines