diff --git a/PhysicsTools/HeppyCore/python/utils/eostools.py b/PhysicsTools/HeppyCore/python/utils/eostools.py index f075326bcdb1e..5b65764c4bee4 100644 --- a/PhysicsTools/HeppyCore/python/utils/eostools.py +++ b/PhysicsTools/HeppyCore/python/utils/eostools.py @@ -12,7 +12,7 @@ def splitPFN(pfn): """Split the PFN in to { , , , }""" - groups = re.match("^(\w\+)://([^/]+)/(/[^?]+)(\?.*)?", pfn) + groups = re.match("^(\w+)://([^/]+)/(/[^?]+)(\?.*)?", pfn) if not groups: raise RuntimeError, "Malformed pfn: '%s'" % pfn return (groups.group(1), groups.group(2), groups.group(3), groups.group(4)) @@ -190,10 +190,10 @@ def createEOSDir( path ): ???Will, I'm quite worried by the fact that if this path already exists, and is a file, everything will 'work'. But then we have a file, and not a directory, while we expect a dir...""" - lfn = eosToLFN(path) - if not isEOSFile(lfn): + pfn = lfnToPFN(path) + if not isEOSFile(pfn): # if not isDirectory(lfn): - runEOSCommand(lfn,'mkdir','-p') + runEOSCommand(pfn,'mkdir','-p') if isDirectory(path): return path else: