Changeset 270


Ignore:
Timestamp:
08/24/11 14:11:46 (13 years ago)
Author:
bas
Message:

fixed an error in examples/sara_nodes.py

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/CHANGES

    r269 r270  
    11=========== 4.X.X
    22 * New generated files for pbs_wrap.c and pbs.py to support python 3.X versions
     3   Author: Bas van der Vlies
     4
    35 * Fixed AdvancedParser when using 01-12 range the zero was not appended.
    46   Reported by: Ramon Bastiaans
    57   Author: Dennis Stam
     8
     9 * examples/sara_nodes.py: Catch the PBSQuery error if we can not make a
     10   connection with the batch server and exit the program.
     11   Author: Bas van der Vlies
    612
    713=========== 4.3.0
     
    2026  Added the following syntax for node:
    2127        * node['error']
    22         * node['event']
     28    * node['event']
    2329
    2430  eg: node: n1
     
    3238  example code:
    3339        p = PBSQuery()
    34         node = p.getnode(n1)
    35         print node.event['sample.time']
    36         print node['event']['sample.time']
     40    node = p.getnode(n1)
     41    print node.event['sample.time']
     42    print node['event']['sample.time']
    3743
    3844   Requested by: Roy Dragseth <roy dot dragseth add uit dotno>
  • trunk/debian/changelog

    r264 r270  
     1pbs-python (4.3.1-1) lenny; urgency=low
     2
     3  * see CHANGES
     4
     5 -- Bas van der Vlies <bas@sara.nl>  Wed, 24 Aug 2011 14:08:09 +0200
     6
    17pbs-python (4.3.0-1) lenny; urgency=low
    28
  • trunk/examples/sara_nodes.py

    r252 r270  
    232232                '''
    233233
    234                 header = ' %-10s | %-19s | %s' % ( 'Nodename', 'State', 'Note' )
    235                 if not options.quiet:
    236                         print '\n%s\n%s' % ( header, ( '-' * 80 ) )
    237234               
    238235                p = PBSQuery.PBSQuery()
     
    242239                        p.new_data_structure()
    243240
    244                 nodes = p.getnodes( ['state', 'note'] )
     241                try:
     242                    nodes = p.getnodes( ['state', 'note'] )
     243                except PBSQuery.PBSError, detail:
     244                    print "PBSQuery error: %s" %detail
     245                    sys.exit(1)
     246
     247                header = ' %-10s | %-19s | %s' % ( 'Nodename', 'State', 'Note' )
     248                if not options.quiet:
     249                        print '\n%s\n%s' % ( header, ( '-' * 80 ) )
    245250
    246251                if args:
Note: See TracChangeset for help on using the changeset viewer.