donate-cpu.py: Simplify check if line is not empty
In Python an empty string returns False in a conditional check. No need to calculate lenght or compare it with an empty string.
This commit is contained in:
parent
360ba33e4c
commit
dcff026da0
|
@ -263,11 +263,10 @@ def scanPackage(workPath, cppcheckPath, jobs):
|
||||||
for line in stderr.split('\n'):
|
for line in stderr.split('\n'):
|
||||||
if ': information: ' in line:
|
if ': information: ' in line:
|
||||||
information_messages += line + '\n'
|
information_messages += line + '\n'
|
||||||
else:
|
elif line:
|
||||||
if len(line) > 0:
|
issue_messages += line + '\n'
|
||||||
issue_messages += line + '\n'
|
if re.match(r'.*:[0-9]+:.*\]$', line):
|
||||||
if re.match(r'.*:[0-9]+:.*\]$', line):
|
count += 1
|
||||||
count += 1
|
|
||||||
print('Number of issues: ' + str(count))
|
print('Number of issues: ' + str(count))
|
||||||
return count, issue_messages, information_messages, elapsedTime, options
|
return count, issue_messages, information_messages, elapsedTime, options
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue