You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> from filetype import match
>>> from filetype.types.archive import Pdf, Deb
>>> pdf = open("/home/oznt/1501006622.pdf", "rb")
>>> match(pdf, matchers=(Pdf(), Deb()))
<filetype.types.archive.Pdf at 0x7f570ca796d8>
Now, notice if you call the function again it will return None
>>> match(pdf, matchers=(Pdf(), Deb()))
If you seek(0) it works again:
>>> pdf.seek(0)
0
>>> match(pdf, matchers=(Pdf(), Deb()))
<filetype.types.archive.Pdf at 0x7f570ca32a90>
You see a new object is created.
@h2non IMHO, this is a bug: filetype should not pass silently on EOF and throw an exception here.
No description provided.
The text was updated successfully, but these errors were encountered: