Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

except BrokenPipeError on github #2535

Merged
merged 5 commits into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions tests/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,22 @@
import os
import fs
import tempfile
import logging
from fs.tempfs import TempFS

try:
import git
except ImportError:
SHA = ""
else:
repo = git.Repo(os.path.dirname(os.path.realpath(__file__)), search_parent_directories=True)
path = os.path.dirname(os.path.realpath(__file__))
repo = git.Repo(path, search_parent_directories=True)
logging.debug(path)
try:
# this is for local development important to get a fresh named tmpdir
SHA = repo.head.object.hexsha[0:10]
except ValueError:
except (ValueError, BrokenPipeError) as ex:
logging.debug("Unknown Problem: %s", ex)
# mounted dir in docker container and owner is not root
SHA = ""

Expand Down
Loading