We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4963ff1 commit a3a9d7fCopy full SHA for a3a9d7f
module/api/ceye.py
@@ -13,7 +13,10 @@ def ceye():
13
ceye_token = globals.get_value("ceye_token")
14
15
api_url = "http://api.ceye.io/v1/records?type=dns&token=" + ceye_token
16
- res = requests.get(api_url, headers=headers, timeout=timeout, verify=False)
17
- if res.status_code != 200:
18
- print(now.timed(de=0) + color.red_warn() + color.red(" Ceye.io: " + res.text))
19
- return res.text
+ try:
+ res = requests.get(api_url, headers=headers, timeout=timeout, verify=False)
+ if res.status_code != 200:
+ print(now.timed(de=0) + color.red_warn() + color.red(" Ceye.io: " + res.text))
20
+ return res.text
21
+ except Exception:
22
+ return "Ceye.io connection failed"
0 commit comments