Skip to content

Commit

Permalink
chore: tweak version lookup for non-admin client
Browse files Browse the repository at this point in the history
Closes #162
Closes #163
  • Loading branch information
tseaver committed Nov 12, 2020
1 parent 6d597a1 commit f0f9878
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions synth.py
Expand Up @@ -69,6 +69,23 @@
"""
)

s.replace(
"google/cloud/bigtable_v2/gapic/bigtable_client.py",
"""\
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution\(
'google-cloud-bigtable',
\).version
""",
"""\
try:
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
"google-cloud-bigtable"
).version
except pkg_resources.DistributionNotFound: # pragma: NO COVER
_GAPIC_LIBRARY_VERSION = None
"""
)

# ----------------------------------------------------------------------------
# Add templated files
# ----------------------------------------------------------------------------
Expand Down

0 comments on commit f0f9878

Please sign in to comment.