Fix SonarQube python:S1871.

This commit is contained in:
Andris Raugulis 2017-04-05 04:27:39 +03:00
parent 464bb154f3
commit 09c2e7b2d5

View File

@ -1192,11 +1192,9 @@ class SSH(object): # pylint: disable=too-few-public-methods
if ssh_prefix not in result: if ssh_prefix not in result:
result[ssh_prefix] = [None, None, None] result[ssh_prefix] = [None, None, None]
prev, push = result[ssh_prefix][i], False prev, push = result[ssh_prefix][i], False
if prev is None: if ((prev is None) or
push = True (prev < ssh_version and i == 0) or
elif i == 0 and prev < ssh_version: (prev > ssh_version and i > 0)):
push = True
elif i > 0 and prev > ssh_version:
push = True push = True
if push: if push:
result[ssh_prefix][i] = ssh_version result[ssh_prefix][i] = ssh_version