]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-daemon: try py2 import before py3 31168/head
authorSage Weil <sage@redhat.com>
Mon, 28 Oct 2019 17:17:07 +0000 (12:17 -0500)
committerSage Weil <sage@redhat.com>
Mon, 28 Oct 2019 17:17:07 +0000 (12:17 -0500)
See https://github.com/ceph/ceph-medic/commit/f499a89b15b72a5bb842e1ebbc7cafc4daf58c1c

Signed-off-by: Sage Weil <sage@redhat.com>
src/ceph-daemon

index 375849a7bec6934719baa8de2e31dcef6bcba3c7..cf1402e180b3659d75c4f99d1ddfa3c26bf38c55 100755 (executable)
@@ -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