From 20571c87ae9e1ca8a1f3120511910751420a35ac Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Sat, 4 Apr 2020 17:01:56 -0700 Subject: [PATCH] us in instead of find() --- jc/parsers/jobs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jc/parsers/jobs.py b/jc/parsers/jobs.py index c5c5f0b8..41ef192d 100644 --- a/jc/parsers/jobs.py +++ b/jc/parsers/jobs.py @@ -77,7 +77,7 @@ import jc.utils class info(): - version = '1.0' + version = '1.1' description = 'jobs command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -176,11 +176,11 @@ def parse(data, raw=False, quiet=False): parsed_line.insert(0, job_number) # check for + or - in first field - if parsed_line[0].find('+') != -1: + if '+' in parsed_line[0]: job_history = 'current' parsed_line[0] = parsed_line[0].rstrip('+') - if parsed_line[0].find('-') != -1: + if '-' in parsed_line[0]: job_history = 'previous' parsed_line[0] = parsed_line[0].rstrip('-')