File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1414
1515"""GCloud API access in idiomatic Python."""
1616
17- from pkg_resources import get_distribution
18-
19- __version__ = get_distribution ('gcloud' ).version
17+ try :
18+ import pkg_resources
19+ __version__ = pkg_resources .get_distribution ('gcloud' ).version
20+ except (ImportError , pkg_resources .DistributionNotFound ): # pragma: NO COVER
21+ __version__ = None
Original file line number Diff line number Diff line change 1414
1515""" Shared implementation of connections to API servers."""
1616
17- from pkg_resources import get_distribution
18-
1917import httplib2
2018
19+ import gcloud
20+
2121
2222class Connection (object ):
2323 """A generic connection to Google Cloud Platform.
@@ -32,7 +32,7 @@ class Connection(object):
3232 _EMPTY = object ()
3333 """A pointer to represent an empty value for default arguments."""
3434
35- USER_AGENT = "gcloud-python/{0}" .format (get_distribution ( ' gcloud' ). version )
35+ USER_AGENT = "gcloud-python/{0}" .format (gcloud . __version__ )
3636 """The user agent for gcloud-python requests."""
3737
3838 def __init__ (self , credentials = None ):
You can’t perform that action at this time.
0 commit comments