it's simpler and more consistent with other part of ceph.
Signed-off-by: Kefu Chai <kchai@redhat.com>
import sys
# Are we running Python 2.x
-_python2 = sys.hexversion < 0x03000000
-
-if _python2:
+if sys.version_info[0] < 3:
str_type = basestring
else:
str_type = str
from itertools import chain
# Are we running Python 2.x
-_python2 = sys.hexversion < 0x03000000
-
-if _python2:
+if sys.version_info[0] < 3:
str_type = basestring
else:
str_type = str
import sys
# Are we running Python 2.x
-_python2 = sys.hexversion < 0x03000000
+_python2 = sys.version_info[0] < 3
def test_rados_init_error():
assert_raises(Error, Rados, conffile='', rados_id='admin',