1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

Remove unused code

This commit is contained in:
slush0 2016-04-28 03:28:23 +02:00 committed by Pavol Rusnak
parent d5e2e2ee45
commit f27d5ad725
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -1,6 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Implements the Google's protobuf encoding.
# eigenein (c) 2011
# http://eigenein.me/protobuf/
@ -77,9 +74,6 @@ FLAG_REQUIRED_MASK = 1
FLAG_SINGLE = 0
FLAG_REPEATED = 2
FLAG_REPEATED_MASK = 6
FLAG_PRIMITIVE = 0
FLAG_EMBEDDED = 8
FLAG_EMBEDDED_MASK = 8
class EofWrapper:
# Wraps a stream to raise EOFError instead of just returning of ''.
@ -151,7 +145,8 @@ class MessageType:
raise ValueError('The field with the tag %s is required but a value is missing.' % tag)
def load(self, fp):
fp, message = EofWrapper(fp), self.__call__() # Wrap fp and create a new instance.
fp = EofWrapper(fp)
message = self.__call__()
while True:
try:
tag, wire_type = _unpack_key(UVarintType.load(fp))