Fix '_io.BufferedReader' object has no attribute 'next'
Under Python 3, many programs such as ligolw_sqlite
would fail
with the following error message:
Traceback (most recent call last):
File "/usr/bin/ligolw_sqlite", line 158, in <module>
ligolw_sqlite.insert_from_url(url, contenthandler = ContentHandler, preserve_ids = options.preserve_ids, verbose = options.verbose)
File "/usr/lib/python3.7/site-packages/ligo/lw/utils/ligolw_sqlite.py", line 147, in insert_from_url
xmldoc = ligolw_utils.load_url(url, verbose = verbose, contenthandler = contenthandler)
File "/usr/lib/python3.7/site-packages/ligo/lw/utils/__init__.py", line 413, in load_url
xmldoc = load_fileobj(fileobj, **kwargs)
File "/usr/lib/python3.7/site-packages/ligo/lw/utils/__init__.py", line 340, in load_fileobj
fileobj = RewindableInputFile(fileobj)
File "/usr/lib/python3.7/site-packages/ligo/lw/utils/__init__.py", line 144, in __init__
self._next = self.fileobj.next
AttributeError: '_io.BufferedReader' object has no attribute 'next'
CC @kipp.cannon, @adam-mercer.