Commit c0b57f5b authored by Maude Martin's avatar Maude Martin
Browse files

debug planckenv

parent ec403d17
......@@ -33,10 +33,10 @@ class PlanckEnvironment(Environment):
logger.error ("groupname is None for DMC object %s"%x)
import piolib
x = path.join(grp, x)
dmcname = path.join(piolib.GetDataDB(), x)
x = path.join(piolib.GetDataDB(), x)
locname = self._get_data_fn(x.replace("/", ":"))
os.system("touch %s"%locname)
return dmcname
return x
## local file
else:
......@@ -64,7 +64,7 @@ class PlanckEnvironment(Environment):
+glob(path.join(self._worker.pipe.get_data_dir(segx),path.join('*/',y)))
def glob_seg(x, y):
def glob_seg(self, x, y):
""" Return the list of filename matching y in the working
directory of segment x.
......@@ -78,17 +78,17 @@ class PlanckEnvironment(Environment):
list of filenames.
"""
f = self.glob_default(x, y)
import piolib
if not f:
#z = y.replace(".fits", "")
z = "*:"+y
self.logger.info("No file matching the extension, looking for DMC object")
z = y.split(".")[0]
z = "*:"+z
self.logger.info("New regexp is %s"%z)
f = self.glob_default(x, z)
if f:
lst = []
for fi in f:
## if dmc object -> replace : with /
if len(fi.split("."))==1:
lst.append(os.path.basename(fi).replace(":", "/"))
f = lst
lst = []
for fi in f:
lst.append(os.path.basename(fi).replace(":", "/"))
f = lst
return f
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment