]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_daemon.py: Resolved ImportError to work with python3 7937/head
authorSarthak Munshi <sarthakmunshi@gmail.com>
Fri, 4 Mar 2016 21:25:17 +0000 (02:55 +0530)
committerSarthak Munshi <sarthakmunshi@gmail.com>
Fri, 4 Mar 2016 22:05:50 +0000 (03:35 +0530)
Signed-off-by: Sarthak Munshi <sarthakmunshi@gmail.com>
src/test/pybind/test_ceph_daemon.py

index a95c8fcda77ed4c3ef7605f089a8847b8ea13606..4fb68f705c394531f626bee23b1821c92a8d3e00 100755 (executable)
@@ -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):