From: Sarthak Munshi Date: Fri, 4 Mar 2016 21:25:17 +0000 (+0530) Subject: ceph_daemon.py: Resolved ImportError to work with python3 X-Git-Tag: v10.1.0~225^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9e47cef30c368eec57a4bb98426e29d6d00f2788;p=ceph-ci.git ceph_daemon.py: Resolved ImportError to work with python3 Signed-off-by: Sarthak Munshi --- diff --git a/src/test/pybind/test_ceph_daemon.py b/src/test/pybind/test_ceph_daemon.py index a95c8fcda77..4fb68f705c3 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):