1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-13 01:20:24 +02:00

us in instead of find()

This commit is contained in:
Kelly Brazil
2020-04-04 17:01:56 -07:00
parent 19e49200de
commit 20571c87ae

View File

@ -77,7 +77,7 @@ import jc.utils
class info(): class info():
version = '1.0' version = '1.1'
description = 'jobs command parser' description = 'jobs command parser'
author = 'Kelly Brazil' author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com' author_email = 'kellyjonbrazil@gmail.com'
@ -176,11 +176,11 @@ def parse(data, raw=False, quiet=False):
parsed_line.insert(0, job_number) parsed_line.insert(0, job_number)
# check for + or - in first field # check for + or - in first field
if parsed_line[0].find('+') != -1: if '+' in parsed_line[0]:
job_history = 'current' job_history = 'current'
parsed_line[0] = parsed_line[0].rstrip('+') parsed_line[0] = parsed_line[0].rstrip('+')
if parsed_line[0].find('-') != -1: if '-' in parsed_line[0]:
job_history = 'previous' job_history = 'previous'
parsed_line[0] = parsed_line[0].rstrip('-') parsed_line[0] = parsed_line[0].rstrip('-')