- Timestamp:
- 08/13/10 15:06:59 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/PBSQuery.py
r243 r245 437 437 jobs = self.get_value('jobs') 438 438 if jobs: 439 if type(jobs) == type('string'):440 j obs= re.compile('[^\\ /]\\d+[^/.]').findall( jobs )439 if isinstance(jobs, str): 440 jlist = re.compile('[^\\ /]\\d+[^/.]').findall( jobs ) 441 441 442 if not unique: 443 return jobs 442 if not unique: 443 return jlist 444 else: 445 return self.uniq(jlist) 446 444 447 else: 445 448 job_re = re.compile('^(?:\d+/)?(.+)') 446 449 l = list() 447 450 448 for j in jobs: 449 jobstr = job_re.findall(j.strip())[0] 450 if jobstr not in l: 451 l.append(jobstr) 452 return l 451 if unique: 452 for j in jobs: 453 jobstr = job_re.findall(j.strip())[0] 454 if jobstr not in l: 455 l.append(jobstr) 456 457 return l 458 else: 459 return jobs 453 460 454 461 return list()
Note: See TracChangeset
for help on using the changeset viewer.