Changeset 245
- Timestamp:
- 08/13/10 15:06:59 (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGES
r244 r245 21 21 - fixed and error in get_jobs function for nodes. Did not 22 22 support new data structure and uniq did not work. 23 Authors: Shunjie Lau <eijnuhs at gmail dot com> and Bas van der Vlie 23 Authors: Shunjie Lau <eijnuhs at gmail dot com> and Bas van der Vlies 24 24 25 25 =========== 4.1.0 -
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.