From 1fedd38de6c14fb71529a8ee52390b6edfa837d0 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt <cyril.roelandt@enovance.com> Date: Fri, 4 Jul 2014 10:20:37 +0200 Subject: [PATCH] Python 3: remove a useless code to safe_encode() The safe_encode method returns bytes, so we cannot concatenate its output with text strings. This call does not seem needed after all, so let's just remove it. Change-Id: I6c18427559147d4c732ff7daa6d6006e7e5f6365 --- openstackclient/common/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/openstackclient/common/utils.py b/openstackclient/common/utils.py index 0258f93122..51c3ed4b28 100644 --- a/openstackclient/common/utils.py +++ b/openstackclient/common/utils.py @@ -23,7 +23,6 @@ import sys import time from openstackclient.common import exceptions -from openstackclient.openstack.common import strutils def find_resource(manager, name_or_id): @@ -79,8 +78,7 @@ def format_dict(data): output = "" for s in data: - output = output + s + "='" + \ - strutils.safe_encode(six.text_type(data[s])) + "', " + output = output + s + "='" + six.text_type(data[s]) + "', " return output[:-2]