- Timestamp:
- 05/20/10 11:14:25 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/PBSQuery.py
r227 r240 418 418 def get_jobs(self, unique=None): 419 419 """Returns a list of the currently running job-id('s) on the node""" 420 jobstring = self.get_value('jobs') 421 if jobstring: 422 joblist = re.compile('[^\\ /]\\d+[^/.]').findall( jobstring ) 420 421 jobs = self.get_value('jobs') 422 if jobs: 423 if type(jobs) == type('string') : 424 jobs = re.compile('[^\\ /]\\d+[^/.]').findall( jobs ) 425 423 426 if not unique: 424 return job list427 return jobs 425 428 else: 426 return self.uniq(joblist) 429 job_re = re.compile('^(?:\d+/)?(.+)') 430 l = list() 431 432 for j in jobs: 433 jobstr = job_re.findall(j.strip())[0] 434 if jobstr not in l: 435 l.append(jobstr) 436 437 return l 438 427 439 return list() 428 440
Note: See TracChangeset
for help on using the changeset viewer.