solr-zkutil
solr-zkutil copied to clipboard
bug: None can be returned when executing a watch on a directory with no nodes.
solr-zkutil watch /overseer_elect --env PILOT
ERROR:kazoo.recipe.watchers:'NoneType' object has no attribute 'decode'
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\kazoo\recipe\watchers.py", line 161, in _log_func_exception
result = self._func(data, stat, event)
File "C:\Python27\lib\site-packages\solrzkutil\__init__.py", line 619, in watch_data
data = data.decode('utf-8')
AttributeError: 'NoneType' object has no attribute 'decode'
Traceback (most recent call last):
File "C:\Python27\Scripts\solr-zkutil", line 13, in <module>
sys.exit(main(sys.argv))
File "C:\Python27\lib\site-packages\solrzkutil\__init__.py", line 1002, in main
watch(zookeepers=args['zookeepers'], node=args['node'], leader=args['leader'])
File "C:\Python27\lib\site-packages\solrzkutil\__init__.py", line 614, in watch
@zk.DataWatch(node)
File "C:\Python27\lib\site-packages\kazoo\recipe\watchers.py", line 151, in __call__
self._get_data()
File "C:\Python27\lib\site-packages\kazoo\recipe\watchers.py", line 36, in wrapper
return func(*args, **kwargs)
File "C:\Python27\lib\site-packages\kazoo\recipe\watchers.py", line 205, in _get_data
self._log_func_exception(data, stat, event)
File "C:\Python27\lib\site-packages\kazoo\recipe\watchers.py", line 161, in _log_func_exception
result = self._func(data, stat, event)
File "C:\Python27\lib\site-packages\solrzkutil\__init__.py", line 619, in watch_data
data = data.decode('utf-8')
AttributeError: 'NoneType' object has no attribute 'decode'