You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2018/11/01 17:46:46 UTC

[trafficcontrol] 02/05: Fixed a problem with restapi.py using Python2 functions

This is an automated email from the ASF dual-hosted git repository.

dangogh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 0704cdbcb6e81f5890b5ef116b7a3728a4c255bb
Author: ocket8888 <oc...@gmail.com>
AuthorDate: Mon Oct 29 11:41:05 2018 -0600

    Fixed a problem with restapi.py using Python2 functions
---
 traffic_control/clients/python/common/restapi.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/traffic_control/clients/python/common/restapi.py b/traffic_control/clients/python/common/restapi.py
index 177e66e..4fe5518 100644
--- a/traffic_control/clients/python/common/restapi.py
+++ b/traffic_control/clients/python/common/restapi.py
@@ -36,7 +36,11 @@ import common.utils as utils
 # Python 2 to Python 3 Compatibility
 import requests.compat as compat
 from builtins import str
-from future.utils import iteritems
+
+try:
+	from future.utils import iteritems
+except ImportError:
+	iteritems = lambda x: x.items()
 
 
 logger = logging.getLogger(__name__)