Changeset 167 for trunk/src


Ignore:
Timestamp:
10/07/08 23:14:19 (16 years ago)
Author:
sil
Message:

src/PBSQuery.py:

  • Sorry, forgot some things in my previous checkin. But this time I have:
    • Added a line to import the re-module
    • Fixed some typo's in my part of the code
    • Tested my additions

Sil Westerveld

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/PBSQuery.py

    r166 r167  
    6363import string
    6464import sys
     65import re
    6566
    6667class PBSError(Exception):
     
    269270        def get_jobs(self, unique=None):
    270271                """Returns a list of the currently running job-id('s) on the node"""
    271                 jobs = self.get_value('jobs')
    272                 if jobs:
    273                         re.compile('[^\\ /]\\d+[^/.]').findall( jobstring )
     272                jobstring = self.get_value('jobs')
     273                if jobstring:
     274                        joblist = re.compile('[^\\ /]\\d+[^/.]').findall( jobstring )
    274275                        if not unique:
    275                                 return jobs
     276                                return joblist
    276277                        else:
    277278                                uniq = {}
    278                                 for job in jobs:
     279                                for job in joblist:
    279280                                        uniq[job] = 1
    280281                                return uniq.keys()
Note: See TracChangeset for help on using the changeset viewer.