Skip to content
Snippets Groups Projects
Commit e52d4ccc authored by Matthew K Defenderfer's avatar Matthew K Defenderfer
Browse files

if the paths given don't appear in /data/user, /data/project, or /scratch, set tld to None for now

parent 577ea858
No related branches found
No related tags found
1 merge request!15Update main to v0.1.1
......@@ -31,7 +31,12 @@ def parse_line(line):
d = dict([re.match(r'([\w]+)=(.*)',l).groups() for l in details.split('|')])
tld = re.match(r'(?:/data/user(?:/home)?/|/data/project/|/scratch/)([^/]+)',path).group(1)
grp = re.match(r'(?:/data/user(?:/home)?/|/data/project/|/scratch/)([^/]+)',path)
if grp:
tld = grp.groups(1)
else:
tld = None
d.update({'path': path,
'tld': tld})
return d
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment