Python API: Fix mistaken removal of '_' in field names.
[vpp.git] / vpp-api / python / pneum / api-gen.py
index b9a9ee3..df92c19 100755 (executable)
@@ -52,7 +52,11 @@ type_size = {'u8':   1,
 def get_args(t):
     argslist = []
     for i in t:
-        argslist.append(i[1].replace('_',''))
+        if i[1][0] == '_':
+            argslist.append(i[1][1:])
+        else:
+            argslist.append(i[1])
+
     return argslist
 
 def get_pack(t):