PY3: fix sniffer hack for py3