PAPI: Use Python3 for PapiProvider 03/18203/9
authorTibor Frank <tifrank@cisco.com>
Tue, 12 Mar 2019 07:22:21 +0000 (08:22 +0100)
committerTibor Frank <tifrank@cisco.com>
Wed, 13 Mar 2019 08:50:40 +0000 (08:50 +0000)
Change-Id: I39e237db5cba8311ae11fd709b10a17297f3a729
Signed-off-by: Tibor Frank <tifrank@cisco.com>
resources/libraries/python/PapiExecutor.py
resources/tools/papi/vpp_papi_provider.py [changed mode: 0644->0755]

index a51cb76..1971e62 100644 (file)
@@ -341,7 +341,7 @@ class PapiExecutor(object):
         api_data_processed = self._process_api_data(api_data)
         json_data = json.dumps(api_data_processed)
 
-        cmd = "python {fw_dir}/{papi_provider} --json_data '{json}'".format(
+        cmd = "{fw_dir}/{papi_provider} --json_data '{json}'".format(
             fw_dir=Constants.REMOTE_FW_DIR,
             papi_provider=Constants.RESOURCES_PAPI_PROVIDER,
             json=json_data)
old mode 100644 (file)
new mode 100755 (executable)
index e5e030c..d41c4fb
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Copyright (c) 2019 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -185,7 +185,7 @@ def main():
         api_args_unicode = data['api_args']
         api_reply = dict(api_name=api_name)
         api_args = dict()
-        for a_k, a_v in api_args_unicode.iteritems():
+        for a_k, a_v in api_args_unicode.items():
             value = binascii.unhexlify(a_v) if isinstance(a_v, unicode) else a_v
             api_args[str(a_k)] = value
         try:

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.