Skip to content

Commit

Permalink
Fix linting rules and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
achillean committed Dec 14, 2019
1 parent da0e2ae commit 406abf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions shodan/cli/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def scan_internet(quiet, port, protocol):
click.style(str(banner['port']), fg=COLORIZE_FIELDS['port']),
';'.join(banner['hostnames']))
)
except shodan.APIError as e:
except shodan.APIError:
# We stop waiting for results if the scan has been processed by the crawlers and
# there haven't been new results in a while
if done:
Expand All @@ -100,7 +100,7 @@ def scan_internet(quiet, port, protocol):
scan = api.scan_status(scan['id'])
if scan['status'] == 'DONE':
done = True
except socket.timeout as e:
except socket.timeout:
# We stop waiting for results if the scan has been processed by the crawlers and
# there haven't been new results in a while
if done:
Expand Down Expand Up @@ -205,7 +205,7 @@ def scan_submit(wait, filename, force, verbose, netblocks):
done = True
break

except shodan.APIError as e:
except shodan.APIError:
# If the connection timed out before the timeout, that means the streaming server
# that the user tried to reach is down. In that case, lets wait briefly and try
# to connect again!
Expand All @@ -223,7 +223,7 @@ def scan_submit(wait, filename, force, verbose, netblocks):

if verbose:
click.echo('# Scan status: {}'.format(scan['status']))
except socket.timeout as e:
except socket.timeout:
# If the connection timed out before the timeout, that means the streaming server
# that the user tried to reach is down. In that case, lets wait a second and try
# to connect again!
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[flake8]
ignore =
E501
E501 W293

exclude =
build,
Expand Down

0 comments on commit 406abf0

Please sign in to comment.