Skip to content

_get_ani() saves ani_libs.bin every invocation #255

Description

@alfs

Shortly after starting a tag collection, I aborted with ctrl-c. Next execution bombed with python errors.

It seems ani_libs.bin is rewritten/saved at every invocation, and I happened to abort in the middle of the save so the tar/bz became corrupt.

So the question is, does ani_libs.bin need to be saved at every invocation? Will it ever be updated after once downloaded?

See

if self._libs_path is not None:

If it's just a static file, never updated, a simple suggested fix is to check that the file doesn't already exist:

if self._libs_path is not None and not self._libs_path.is_file():

Benefit: no race condition for file corruption and reduced disk wear

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions