Commit 2d60f6e6 authored by Martin Larralde's avatar Martin Larralde
Browse files

Fix extraction of filename from file object in `HMMFile` constructor

parent f47fb771
Pipeline #33167 passed with stage
in 4 minutes and 37 seconds
......@@ -2819,7 +2819,7 @@ cdef class HMMFile:
hfp.errbuf[0] = b"\0"
# extract the filename if the file handle has a `name` attribute
if hasattr(fh, "name"):
if getattr(fh, "name", None) is not None:
filename = fh.name.encode()
hfp.fname = strdup(filename)
if hfp.fname == NULL:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment