| Index: third_party/protobuf/examples/list_people.py
|
| diff --git a/third_party/protobuf/examples/list_people.py b/third_party/protobuf/examples/list_people.py
|
| index 755de901a5a27aeccf42c02f6c90ed7a49dbb860..f131872d841ed49fd34addee63ceeb17b788b21f 100755
|
| --- a/third_party/protobuf/examples/list_people.py
|
| +++ b/third_party/protobuf/examples/list_people.py
|
| @@ -31,8 +31,7 @@ if len(sys.argv) != 2:
|
| address_book = addressbook_pb2.AddressBook()
|
|
|
| # Read the existing address book.
|
| -f = open(sys.argv[1], "rb")
|
| -address_book.ParseFromString(f.read())
|
| -f.close()
|
| +with open(sys.argv[1], "rb") as f:
|
| + address_book.ParseFromString(f.read())
|
|
|
| ListPeople(address_book)
|
|
|