Skip to content

Handling for "files" that are purely in memory? #16

Description

@spott

More accurately, how am I supposed to handle a "file" that is really just a bunch of bytes?

Ideally, I would like to use a BinaryIO object, however, these don't have a name attribute, so I get this error:

  File "/usr/local/lib/python3.5/site-packages/warcat/model/block.py", line 83, in load
    binary_block.set_file(file_obj.name or file_obj, file_obj.tell(), length)
AttributeError: '_io.BytesIO' object has no attribute 'name'

I'm not sure how to get around this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions