Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
elif record_type == "boolean":
return Boolean()
elif record_type == "string":
return String()
elif record_type == "bytes":
return Bytes()
elif record_type == "int":
return Int()
elif record_type == "long":
return Long()
elif record_type == "float":
return Float()
elif record_type == "double":
return Double()
elif record_type == "fixed":
return Fixed()
else:
raise Exception("Unhandled type: {}".format(record_type))
def read_fixed(self, size):
self._parser.advance(Fixed())
return utob(self.read_value(), encoding='iso-8859-1')
def write_fixed(self, value):
self._parser.advance(Fixed())
self.write_value(btou(value, encoding='iso-8859-1'))