Changeset 99
- Timestamp:
- 11/23/05 15:52:53 (18 years ago)
- Location:
- trunk/pbs_swig/distro
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pbs_swig/distro/CHANGES
r98 r99 7 7 find the pbs/torque libraries. If unset it will use 8 8 some useful defaults to find the libaries. 9 10 9 Suggested by: Troy Baer 11 10 12 11 PBSQuery.py: 12 - If we can not make an connection with the server 13 the raise an exception. 14 15 pbs_python.spec: 16 - It can now handle mode bits 17 Author: Martin Pels from SARA 18 13 19 =========== Version 2.8.0 14 20 -
trunk/pbs_swig/distro/pbs_python.spec
r88 r99 1 1 Summary: This package contains the pbs python module. 2 2 Name: pbs_python 3 Version: 2. 7.103 Version: 2.8.1 4 4 Release: 1 5 5 Copyright: See LICENSE … … 10 10 %description 11 11 This package contains the pbs python module. 12 13 %prep14 %setup -q15 12 16 13 %build … … 24 21 25 22 %files 26 %defattr(-,root,root )23 %defattr(-,root,root,0755) 27 24 %doc README TODO examples 28 25 26 /usr/lib/python2.2/site-packages 27 /usr/lib/python2.2/site-packages/pbs 29 28 /usr/lib/python2.2/site-packages/pbs/pbs.py 30 29 /usr/lib/python2.2/site-packages/pbs/PBSQuery.py … … 35 34 36 35 %changelog 36 * Tue Nov 22 2005 Martin Pels <pels@sara.nl> 37 - Changed default directory permissions 37 38 * Tue Nov 01 2005 Martin Pels <pels@sara.nl> 38 39 - Initial version 40 -
trunk/pbs_swig/distro/src/PBSQuery.py
r93 r99 61 61 import pbs 62 62 63 class PBSError(Exception): 64 def __init__(self, msg=''): 65 self.msg = msg 66 Exception.__init__(self, msg) 67 def __repr__(self): 68 return self.msg 69 __str__ = __repr__ 70 63 71 64 72 class PBSQuery: … … 73 81 """Connect to the PBS/Torque server""" 74 82 self.con = pbs.pbs_connect(self.server) 83 if self.con < 0: 84 str = "Could not make an connection with %s\n" %(self.server) 85 raise PBSError(str) 75 86 76 87 def _disconnect(self): … … 86 97 self.attribs[i].name = attrib 87 98 i = i + 1 99 100 def _pbsstr_2_list(self, str, delimiter): 101 """Convert an string to an python list and use delimiter as spit char""" 102 l = sting.splitfields(str, delimiter) 103 if len(l) > 1: 104 return l 88 105 89 106 def _list_2_dict(self, l, class_func):
Note: See TracChangeset
for help on using the changeset viewer.