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

fix: harden version data gathering against DistributionNotFound #212

Merged
merged 2 commits into from Oct 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions google/cloud/firestore_v1/__init__.py
Expand Up @@ -18,9 +18,13 @@

"""Python idiomatic client for Google Cloud Firestore."""

from pkg_resources import get_distribution

__version__ = get_distribution("google-cloud-firestore").version
import pkg_resources

try:
__version__ = pkg_resources.get_distribution("google-cloud-firestore").version
except pkg_resources.DistributionNotFound:
__version__ = None
crwilcox marked this conversation as resolved.
Show resolved Hide resolved

from google.cloud.firestore_v1 import types
from google.cloud.firestore_v1._helpers import GeoPoint
Expand Down