From d72041827ab0c545ea1011c0ff84359a4f46cf0d Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 7 Dec 2020 18:18:29 +0100 Subject: mpm: rpc server: Remove Python2 compat code MPM is Python3-only, but contains some remaining compatibility code for Python2. Because this code requires extra dependencies (like six) and could become obsolete in the future, we remove it to preempt that. No functional changes. --- mpm/python/usrp_mpm/rpc_server.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'mpm/python/usrp_mpm') diff --git a/mpm/python/usrp_mpm/rpc_server.py b/mpm/python/usrp_mpm/rpc_server.py index 4e424c780..1b840ee87 100644 --- a/mpm/python/usrp_mpm/rpc_server.py +++ b/mpm/python/usrp_mpm/rpc_server.py @@ -22,9 +22,6 @@ from gevent import spawn_later from gevent import Greenlet from gevent import monkey monkey.patch_all() -from builtins import str, bytes -from builtins import range -from six import iteritems from contextlib import contextmanager from mprpc import RPCServer from usrp_mpm.mpmlog import get_main_logger @@ -436,7 +433,7 @@ class MPMServer(RPCServer): log_records = get_main_logger().get_log_buf() self.log.trace("Returning %d log records.", len(log_records)) return [ - {k: str(v) for k, v in iteritems(record)} + {k: str(v) for k, v in iter(record.items())} for record in log_records ] -- cgit v1.2.3