DataQualityFlag.write can't handle unicode filenames
The following snippet shows that DataQualityFlag.write
can't handle unicode file names:
>>> from gwpy.segments import DataQualityFlag
>>> flag = DataQualityFlag('H1:TEST')
>>> flag.write(u'test.xml')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/detchar/opt/gwpysoft/lib/python2.6/site-packages/astropy/io/registry.py", line 380, in write
writer(data, *args, **kwargs)
File "/home/detchar/opt/gwpysoft/lib/python2.6/site-packages/gwpy/segments/io/ligolw.py", line 159, in write_ligolw
return write_fileobj(xmldoc, fobj, gz=fobj.name.endswith('.gz'))
AttributeError: 'unicode' object has no attribute 'name'