Changeset 175 for trunk


Ignore:
Timestamp:
10/15/08 14:14:34 (16 years ago)
Author:
sil
Message:

trunk/src/PBSQuery.py:

  • Cleaned up some old lines of code which didn't do anything.
  • Changed the returnvalue of getqueue, getnode and getjob. Now they return an instance of the object, instead of a dict.
  • Now the getnode-function accepts the short name as well as the long name as an argument.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CHANGES

    r171 r175  
     1=========== 3.0.0
     2        - PBSQuery
     3                * Cleaned up some old lines of code which didn't do anything.
     4                * Changed the returnvalue of getqueue, getnode and getjob. Now
     5                  they return an instance of the object, instead of a dict.
     6                * Now the getnode-function accepts the short name as well as
     7                  the long name as an argument.
     8
     9                By: Sil Westerveld <Sil.Westerveld@sara.nl>
     10
    111=========== 2.9.8
    212        - pbs_python.spec file patch added libdir and python defines so it
  • trunk/src/PBSQuery.py

    r171 r175  
    141141                self._disconnect()
    142142               
    143                 self.serverinfo = {}
    144143                self._list_2_dict(serverinfo, server)
    145144
     
    164163                self._statqueue(name, attrib_list)
    165164                q_attrs = self.d['q_express']
    166                 return self.d
     165                return self.d[name]
    167166       
    168167        def getqueues(self, attrib_list=None):
     
    184183                self._disconnect()
    185184               
    186                 self.nodes = {}
    187185                self._list_2_dict(nodes, node)
    188186
    189187        def getnode(self, name, attrib_list=None):
    190188                self._statnode(name, attrib_list)
    191                 return self.d
     189                return self.d[name]
    192190       
    193191        def getnodes(self, attrib_list=None):
     
    210208                self._disconnect()
    211209               
    212                 self.jobs = {}
    213210                self._list_2_dict(jobs, job)
    214211
    215212        def getjob(self, name, attrib_list=None):
     213                # To make sure we use the full name of a job; Changes a name
     214                # like 1234567 into 1234567.server.name
     215                name = name.split('.')[0] + "." + self.get_server_name()
     216
    216217                self._statjob(name, attrib_list)
    217                 return self.d
     218                return self.d[name]
    218219       
    219220        def getjobs(self, attrib_list=None):
Note: See TracChangeset for help on using the changeset viewer.