X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp-api%2Fvapi%2Fvapi_json_parser.py;h=4e62720d37e3800d5faf66bf3f8087e1556354e7;hb=958b750ceaf6c20466bc4e5605da39b4490847d9;hp=1e17c7a5b5a953b5206a3e6e8b4a497c86dd048c;hpb=a3bae4edcd31919bcd9c5f48059532eb307837f4;p=vpp.git diff --git a/src/vpp-api/vapi/vapi_json_parser.py b/src/vpp-api/vapi/vapi_json_parser.py index 1e17c7a5b5a..4e62720d37e 100644 --- a/src/vpp-api/vapi/vapi_json_parser.py +++ b/src/vpp-api/vapi/vapi_json_parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python2 import json @@ -22,7 +22,7 @@ def remove_magic(what): return what -class Field: +class Field(object): def __init__( self, @@ -46,7 +46,7 @@ class Field: (self.name, self.type, self.nelem_field)) -class Type: +class Type(object): def __init__(self, name): self.name = name @@ -54,7 +54,7 @@ class Type: class SimpleType (Type): def __init__(self, name): - super().__init__(name) + super(SimpleType, self).__init__(name) def __str__(self): return self.name @@ -78,7 +78,7 @@ def get_msg_header_defs(struct_type_class, field_class, typedict): ] -class Struct: +class Struct(object): def __init__(self, name, fields): self.name = name @@ -86,7 +86,7 @@ class Struct: self.field_names = [n.name for n in self.fields] -class Message: +class Message(object): def __init__(self, logger, definition, typedict, struct_type_class, simple_type_class, field_class): @@ -217,7 +217,7 @@ class StructType (Type, Struct): return True -class JsonParser: +class JsonParser(object): def __init__(self, logger, files, simple_type_class=SimpleType, struct_type_class=StructType, field_class=Field, message_class=Message):