From 9e47cef30c368eec57a4bb98426e29d6d00f2788 Mon Sep 17 00:00:00 2001 From: Sarthak Munshi Date: Sat, 5 Mar 2016 02:55:17 +0530 Subject: [PATCH] ceph_daemon.py: Resolved ImportError to work with python3 Signed-off-by: Sarthak Munshi --- src/test/pybind/test_ceph_daemon.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/test/pybind/test_ceph_daemon.py b/src/test/pybind/test_ceph_daemon.py index a95c8fcda77ed..4fb68f705c394 100755 --- a/src/test/pybind/test_ceph_daemon.py +++ b/src/test/pybind/test_ceph_daemon.py @@ -11,12 +11,15 @@ License version 2, as published by the Free Software Foundation. See file COPYING. """ -from StringIO import StringIO - from unittest import TestCase from ceph_daemon import DaemonWatcher +try: + from StringIO import StringIO +except ImportError: + from io import StringIO + class TestDaemonWatcher(TestCase): def test_format(self): -- 2.39.5