edwardslabs / CloudBot

CloudBot - The simple, fast, expandable, open-source Python IRC Bot!
GNU General Public License v3.0
28 stars 31 forks source link

Updated whois plugin, fixed crash when certain registrar data is NoneType #246

Open K0HAX opened 6 years ago

K0HAX commented 6 years ago

This patch fixes the following traceback

Traceback (most recent call last):
File "/opt/CloudBot/cloudbot/plugin.py", line 456, in internal_launch
out = yield from task
File "/usr/lib64/python3.4/asyncio/futures.py", line 358, in __iter__
yield self  # This tells Task to wait for completion.
File "/usr/lib64/python3.4/asyncio/tasks.py", line 297, in _wakeup
future.result()
File "/usr/lib64/python3.4/asyncio/futures.py", line 274, in result
raise self._exception
File "/usr/lib64/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/CloudBot/cloudbot/plugin.py", line 423, in _execute_hook_threaded
return call_with_args(hook.function, event)
File "/opt/CloudBot/cloudbot/util/func_utils.py", line 19, in call_with_args
return func(*args)
File "/opt/CloudBot/plugins/whois.py", line 38, in whois
except TypeError:
TypeError: 'NoneType' object is not subscriptable
linuxdaemon commented 6 years ago

This repository is no longer maintained, it has been moved to snoonetIRC/CloudBot