Changeset 346
- Timestamp:
- 08/28/15 07:58:03 (9 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.rpm
r345 r346 1 1 PRODUCT=pbs_python 2 VERSION=4.6. 03 RELEASE= 32 VERSION=4.6.1 3 RELEASE=1 4 4 5 5 #PYTHON_VERSION=2.3 -
trunk/examples/sara_nodes.py
r321 r346 249 249 ## Check if the given host has a note 250 250 note = dictin[host]['note'] if dictin[host].has_key('note') else [] 251 if note:251 if len(note) > 3: 252 252 add_dict['date_add'] = note[0] 253 253 add_dict['date_edit'] = note[1] 254 254 add_dict['username'] = note[2] 255 add_dict['ticket'] = note[3] 256 add_dict['note'] = ",".join(note[4:]) 255 256 if note[3].isdigit(): 257 add_dict['ticket'] = note[3] 258 add_dict['note'] = ",".join(note[4:]) 259 else: 260 add_dict['ticket'] = "" 261 add_dict['note'] = ",".join(note[3:]) 257 262 258 263 ## Create an extra date field, combined for date_edit and date_add … … 310 315 w_username = len(line['username']) 311 316 if line['ticket'] and len(line['ticket']) > w_ticket: 312 w_ticket = len(line['ticket'] )317 w_ticket = len(line['ticket'].strip()) 313 318 if line['note'] and len(line['note']) > w_note: 314 319 w_note = len(line['note']) … … 345 350 show_line_fields.append([w_date_edit,line['date_edit']]) 346 351 show_line_fields.append([w_username,line['username']]) 347 if w_ticket > 0: 348 show_line_fields.append([w_ticket,line['ticket']]) 352 if w_ticket > 0 and line['ticket'].strip(): 353 show_line_fields.append([w_ticket,'#' + line['ticket']]) 354 else: 355 show_line_fields.append([w_ticket,'']) 349 356 show_line_fields.append([w_note,line['note']]) 350 357 … … 402 409 if ARGS_VERBOSE: 403 410 _print('class:SaraNodes func:_get_ticket input:%s' % prev_ticket, file=sys.stderr) 404 cur_ticket = ' #%s' % self.ticket411 cur_ticket = '%s' % self.ticket 405 412 if prev_ticket and cur_ticket == prev_ticket: 406 413 return prev_ticket 407 elif self.ticket and self.ticket.isdigit():414 elif self.ticket: 408 415 return cur_ticket 409 416 elif self.ticket in ['c','clear','N',]: … … 572 579 parser.add_argument('-N','--clear-note', action='store_true', help='clear the message of a node') 573 580 parser.add_argument('-f','--format', metavar='FORMAT', help='change the output of sara_nodes (see footer of --help)') 574 parser.add_argument('-t','--ticket', metavar='TICKET', help='add a ticket number to a node')581 parser.add_argument('-t','--ticket', metavar='TICKET', type=int, help='add a ticket number to a node') 575 582 parser.add_argument('--version', action='version', version=pbs.version) 576 583 -
trunk/pbs_python.spec
r345 r346 4 4 5 5 Name: pbs_python 6 Version: 4.6. 07 Release: 3%{?dist}6 Version: 4.6.1 7 Release: 1%{?dist} 8 8 License: See LICENSE 9 9 Group: Development/Libraries
Note: See TracChangeset
for help on using the changeset viewer.