aboutsummaryrefslogtreecommitdiff
path: root/examples/add_person.py
diff options
context:
space:
mode:
authorDan O'Reilly <oreilldf@gmail.com>2015-08-12 23:57:46 -0400
committerDan O'Reilly <oreilldf@gmail.com>2015-08-12 23:57:46 -0400
commite47cdd5a559f488ba52756927ce68f4cf93874fa (patch)
tree8ce2723e822808baf58e96f569c86035717ea351 /examples/add_person.py
parentdaeaa6a28b81195f24d89222e649d79c9555af8b (diff)
parent38a56ee4b19d72c2e9d81a08b018704d1addf561 (diff)
downloadprotobuf-e47cdd5a559f488ba52756927ce68f4cf93874fa.tar.gz
protobuf-e47cdd5a559f488ba52756927ce68f4cf93874fa.tar.bz2
protobuf-e47cdd5a559f488ba52756927ce68f4cf93874fa.zip
Merge remote-tracking branch 'upstream/master' into py2_py3_straddle
Conflicts: python/google/protobuf/descriptor_pool.py python/google/protobuf/internal/api_implementation_default_test.py python/google/protobuf/internal/cpp_message.py python/google/protobuf/internal/descriptor_database_test.py python/google/protobuf/internal/descriptor_pool_test.py python/google/protobuf/internal/descriptor_python_test.py python/google/protobuf/internal/descriptor_test.py python/google/protobuf/internal/generator_test.py python/google/protobuf/internal/message_factory_python_test.py python/google/protobuf/internal/message_factory_test.py python/google/protobuf/internal/message_test.py python/google/protobuf/internal/proto_builder_test.py python/google/protobuf/internal/python_message.py python/google/protobuf/internal/reflection_test.py python/google/protobuf/internal/service_reflection_test.py python/google/protobuf/internal/symbol_database_test.py python/google/protobuf/internal/text_encoding_test.py python/google/protobuf/internal/text_format_test.py python/google/protobuf/internal/unknown_fields_test.py python/google/protobuf/internal/wire_format_test.py python/google/protobuf/pyext/descriptor_cpp2_test.py python/google/protobuf/pyext/message_factory_cpp2_test.py python/google/protobuf/pyext/reflection_cpp2_generated_test.py python/setup.py ruby/lib/google/protobuf/message_exts.rb
Diffstat (limited to 'examples/add_person.py')
-rwxr-xr-xexamples/add_person.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/add_person.py b/examples/add_person.py
index 78e56966..fd81c982 100755
--- a/examples/add_person.py
+++ b/examples/add_person.py
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python
# See README.txt for information and build instructions.
@@ -19,7 +19,7 @@ def PromptForAddress(person):
if number == "":
break
- phone_number = person.phone.add()
+ phone_number = person.phones.add()
phone_number.number = number
type = raw_input("Is this a mobile, home, or work phone? ")
@@ -50,7 +50,7 @@ except IOError:
print sys.argv[1] + ": File not found. Creating a new file."
# Add an address.
-PromptForAddress(address_book.person.add())
+PromptForAddress(address_book.people.add())
# Write the new address book back to disk.
f = open(sys.argv[1], "wb")