misc: Fix python scripts shebang line
[vpp.git] / src / vpp / stats / stats.md
index 6a62ca6..8671f56 100644 (file)
@@ -61,7 +61,7 @@ A new client library can either wrap the C library (libvppapiclient.so) or it ca
 ### Python
 
 ```
-#!/usr/bin/env python
+#!/usr/bin/env python3
 from vpp_papi.vpp_stats import VPPStats
 stats = VPPStats('/run/vpp/stats.sock')
 dir = stats.ls(['^/if', '/err/ip4-input', '/sys/node/ip4-input'])
@@ -106,7 +106,8 @@ int main (int argc, char **argv) {
       break;
 
       case STAT_DIR_TYPE_ERROR_INDEX:
-        fformat (stdout, "%llu %s\n", res[i].error_value, res[i].name);
+        for (j = 0; j < vec_len (res[i].error_vector); j++)
+          fformat (stdout, "[@%d] %llu %s\n", j, res[i].error_vector[j], res[i].name);
       break;
 
       case STAT_DIR_TYPE_SCALAR_INDEX: