aboutsummaryrefslogtreecommitdiffhomepage
path: root/python/google/protobuf/internal/python_message.py
diff options
context:
space:
mode:
authorGravatar Bo Yang <teboring@google.com>2016-09-23 21:13:11 +0000
committerGravatar Bo Yang <teboring@google.com>2016-10-10 11:44:21 -0700
commit1c4cf0eeb52dd22bdd1ec3136b4f9b977e6edf07 (patch)
tree222a3ec32dbbf6f525806128e00832fb659cbf63 /python/google/protobuf/internal/python_message.py
parent460e7dd7c47b5a3fc290008317c044fac741916a (diff)
Fix python cpp.
Diffstat (limited to 'python/google/protobuf/internal/python_message.py')
-rwxr-xr-xpython/google/protobuf/internal/python_message.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/google/protobuf/internal/python_message.py b/python/google/protobuf/internal/python_message.py
index 60b4baad..dc6565d4 100755
--- a/python/google/protobuf/internal/python_message.py
+++ b/python/google/protobuf/internal/python_message.py
@@ -63,7 +63,10 @@ except ImportError:
# nothing like hermetic Python. This means lesser control on the system and
# the six.moves package may be missing (is missing on 20150321 on gMac). Be
# extra conservative and try to load the old replacement if it fails.
- import copy_reg as copyreg
+ try:
+ import copy_reg as copyreg #PY26
+ except ImportError:
+ import copyreg
# We use "as" to avoid name collisions with variables.
from google.protobuf.internal import containers