Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions shodan/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,10 +929,13 @@ def radar():
key = get_api_key()
api = shodan.Shodan(key)

from shodan.cli.worldmap import launch_map

try:
from shodan.cli.worldmap import launch_map
launch_map(api)
except ImportError as e:
if getattr(e, 'name', None) in ('curses', '_curses') or 'curses' in str(e):
raise click.ClickException('The radar command requires Python curses support. On Windows, install windows-curses and try again.')
raise
except shodan.APIError as e:
raise click.ClickException(e.value)
except Exception as e:
Expand Down