- Timestamp:
- 10/07/08 16:57:53 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/PBSQuery.py
r164 r166 87 87 self.con = pbs.pbs_connect(self.server) 88 88 if self.con < 0: 89 str = "Could not make a nconnection with %s\n" %(self.server)89 str = "Could not make a connection with %s\n" %(self.server) 90 90 raise PBSError(str) 91 91 … … 96 96 97 97 def _list_2_attrib(self, list): 98 """Convert a npython list to an attrib list suitable for pbs"""98 """Convert a python list to an attrib list suitable for pbs""" 99 99 self.attribs = pbs.new_attrl( len(list) ) 100 100 i = 0 … … 104 104 105 105 def _pbsstr_2_list(self, str, delimiter): 106 """Convert a n string to anpython list and use delimiter as spit char"""106 """Convert a string to a python list and use delimiter as spit char""" 107 107 l = sting.splitfields(str, delimiter) 108 108 if len(l) > 1: … … 110 110 111 111 def _list_2_dict(self, l, class_func): 112 """Convert a n pbsstat function list to anclass dictionary"""112 """Convert a pbsstat function list to a class dictionary""" 113 113 self.d = {} 114 114 for item in l: … … 266 266 else: 267 267 return self.FALSE 268 269 def get_jobs(self, unique=None): 270 """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 ) 274 if not unique: 275 return jobs 276 else: 277 uniq = {} 278 for job in jobs: 279 uniq[job] = 1 280 return uniq.keys() 281 return list() 282 283 284 285 268 286 269 287 class queue(_PBSobject):
Note: See TracChangeset
for help on using the changeset viewer.