File: exception.py

package info (click to toggle)
python-shodan 1.28.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 400 kB
  • sloc: python: 2,674; makefile: 150
file content (11 lines) | stat: -rw-r--r-- 274 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
class APIError(Exception):
    """This exception gets raised whenever a non-200 status code was returned by the Shodan API."""
    def __init__(self, value):
        self.value = value

    def __str__(self):
        return self.value


class APITimeout(APIError):
    pass