diff options
author | Irina Iancu <elenairina@google.com> | 2017-02-24 13:04:14 +0100 |
---|---|---|
committer | Irina Iancu <elenairina@google.com> | 2017-02-24 15:48:27 +0100 |
commit | e50388e66e1378b8c6a93bbc331e27771bd3aedc (patch) | |
tree | 074d518c6e652f6138a10ddf05286093dda3f563 /third_party/protobuf/3.2.0/examples/list_people.py | |
parent | e716ae46f359dc1361574f44569811ff80a758ac (diff) |
Revert "Upgrade //third_party/protobuf to v3.2.0"
This reverts commit 2346f5a01561f695a2b2ba7655359d5020105077.
It breaks bazel build in freebsd[1]. The solution is to patch
https://svnweb.freebsd.org/ports/head/devel/protobuf/files/. I
rolled-back this since the other builds will not automatically start if
Bazel is broken.
[1] http://ci.bazel.io/view/Bazel%20bootstrap%20and%20maintenance/job/Bazel/JAVA_VERSION=1.8,PLATFORM_NAME=freebsd-11/1312/
Change-Id: I7e939a4293d799ab6dd67f93d219d1efdf4cd901
Diffstat (limited to 'third_party/protobuf/3.2.0/examples/list_people.py')
-rwxr-xr-x | third_party/protobuf/3.2.0/examples/list_people.py | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/third_party/protobuf/3.2.0/examples/list_people.py b/third_party/protobuf/3.2.0/examples/list_people.py deleted file mode 100755 index f131872d84..0000000000 --- a/third_party/protobuf/3.2.0/examples/list_people.py +++ /dev/null @@ -1,37 +0,0 @@ -#! /usr/bin/env python - -# See README.txt for information and build instructions. - -import addressbook_pb2 -import sys - -# Iterates though all people in the AddressBook and prints info about them. -def ListPeople(address_book): - for person in address_book.people: - print "Person ID:", person.id - print " Name:", person.name - if person.email != "": - print " E-mail address:", person.email - - for phone_number in person.phones: - if phone_number.type == addressbook_pb2.Person.MOBILE: - print " Mobile phone #:", - elif phone_number.type == addressbook_pb2.Person.HOME: - print " Home phone #:", - elif phone_number.type == addressbook_pb2.Person.WORK: - print " Work phone #:", - print phone_number.number - -# Main procedure: Reads the entire address book from a file and prints all -# the information inside. -if len(sys.argv) != 2: - print "Usage:", sys.argv[0], "ADDRESS_BOOK_FILE" - sys.exit(-1) - -address_book = addressbook_pb2.AddressBook() - -# Read the existing address book. -with open(sys.argv[1], "rb") as f: - address_book.ParseFromString(f.read()) - -ListPeople(address_book) |