Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Raising of GitCommandError fails in archive function if stdout was a cStringIO object #619

Closed
@wohauser

Description

@wohauser

I tried to check out an archive for a not existing path from the repository and I expect a GitCommandError exception.

I got following TypeError exception:
"Expected bytes or text, but got <cStringIO.StringO object at 0x7fabac6f97a0>"

I did following:
fpt = StringIO()
-- (used as a temporary storage for the tar archive)
self._repository.archive(fpt, treeish=version_identifier, format="tar", path=sub_path)
-- (where sub_path points to an not existing path)

The cause of the problem was, the Constructor of the GitCommandError could not handle the cStringIO object. (a normal file pointer may be faulty too).
I suppose it should set its stdout variable to None in case of not handled types. Or it should be adjusted when raising the exception.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp