Skip to content

Commit

Permalink
Fix SonarQube python:S1871.
Browse files Browse the repository at this point in the history
  • Loading branch information
arthepsy committed Apr 5, 2017
1 parent 464bb15 commit 09c2e7b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ssh-audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1192,11 +1192,9 @@ def get_timeframe(cls, versions, for_server=True, result=None):
if ssh_prefix not in result:
result[ssh_prefix] = [None, None, None]
prev, push = result[ssh_prefix][i], False
if prev is None:
push = True
elif i == 0 and prev < ssh_version:
push = True
elif i > 0 and prev > ssh_version:
if ((prev is None) or
(prev < ssh_version and i == 0) or
(prev > ssh_version and i > 0)):
push = True
if push:
result[ssh_prefix][i] = ssh_version
Expand Down

0 comments on commit 09c2e7b

Please sign in to comment.