From: Sage Weil Date: Mon, 28 Oct 2019 17:17:07 +0000 (-0500) Subject: ceph-daemon: try py2 import before py3 X-Git-Tag: v15.1.0~1129^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F31168%2Fhead;p=ceph.git ceph-daemon: try py2 import before py3 See https://github.com/ceph/ceph-medic/commit/f499a89b15b72a5bb842e1ebbc7cafc4daf58c1c Signed-off-by: Sage Weil --- diff --git a/src/ceph-daemon b/src/ceph-daemon index 375849a7bec..cf1402e180b 100755 --- a/src/ceph-daemon +++ b/src/ceph-daemon @@ -32,14 +32,14 @@ You can invoke ceph-daemon in two ways: import argparse try: - from configparser import ConfigParser # py3 -except ImportError: from ConfigParser import ConfigParser # py2 +except ImportError: + from configparser import ConfigParser # py3 import fcntl try: - from io import StringIO # py3 -except: from StringIO import StringIO # py2 +except: + from io import StringIO # py3 import json import logging import os