From f0ced867a95866f0cb35b1eec7e1a771f7ea1f81 Mon Sep 17 00:00:00 2001 From: Pier Carlo Chiodi Date: Wed, 20 Sep 2017 17:31:16 +0200 Subject: [PATCH 1/2] tentatively fixes #309 --- napalm_base/clitools/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/napalm_base/clitools/helpers.py b/napalm_base/clitools/helpers.py index d3020e57..1acc35d1 100644 --- a/napalm_base/clitools/helpers.py +++ b/napalm_base/clitools/helpers.py @@ -121,6 +121,6 @@ def configure_logging(logger, debug): def parse_optional_args(optional_args): if optional_args is not None: - return {x.split('=')[0]: ast.literal_eval(x.split('=')[1]) + return {x.split('=')[0]: x.split('=')[1] for x in optional_args.split(',')} return {} From 3bc3c658658804ebfb6d9a12dddcb54df2ddc751 Mon Sep 17 00:00:00 2001 From: Pier Carlo Chiodi Date: Wed, 20 Sep 2017 18:19:41 +0200 Subject: [PATCH 2/2] ast no more needed --- napalm_base/clitools/helpers.py | 1 - 1 file changed, 1 deletion(-) diff --git a/napalm_base/clitools/helpers.py b/napalm_base/clitools/helpers.py index 1acc35d1..f61c3431 100644 --- a/napalm_base/clitools/helpers.py +++ b/napalm_base/clitools/helpers.py @@ -10,7 +10,6 @@ from __future__ import unicode_literals # stdlib -import ast import sys import logging import getpass