aboutsummaryrefslogtreecommitdiff
path: root/python/google/__init__.py
diff options
context:
space:
mode:
authorPete Warden <pete@petewarden.com>2016-03-09 13:05:15 -0800
committerPete Warden <pete@petewarden.com>2016-03-09 13:05:15 -0800
commitbc2d6c2504b38dda4345e9960948d96102daccc3 (patch)
tree48ad357a166b3bf9715a20714db8c117d8150c41 /python/google/__init__.py
parentf0c1a8637218a03a083901493c9b3acdb6e5db57 (diff)
parent48ebb29a8ec118bf6b9ee39f6be42b57321c099a (diff)
downloadprotobuf-bc2d6c2504b38dda4345e9960948d96102daccc3.tar.gz
protobuf-bc2d6c2504b38dda4345e9960948d96102daccc3.tar.bz2
protobuf-bc2d6c2504b38dda4345e9960948d96102daccc3.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'python/google/__init__.py')
-rwxr-xr-xpython/google/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/google/__init__.py b/python/google/__init__.py
index de40ea7c..55856141 100755
--- a/python/google/__init__.py
+++ b/python/google/__init__.py
@@ -1 +1,4 @@
-__import__('pkg_resources').declare_namespace(__name__)
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+ __path__ = __import__('pkgutil').extend_path(__path__, __name__)