]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs-shell: assert python3
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 18 Jun 2019 22:11:58 +0000 (15:11 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 20 Jun 2019 22:31:10 +0000 (15:31 -0700)
There's little reason to support this new tool with python2.

Fixes: http://tracker.ceph.com/issues/40418
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit de429c48c45add1fcf16b1e019e9598af48bb8f5)

src/tools/cephfs/cephfs-shell

index 32a5b7367750d9ff960a8c47f9ff216dc0b3a46f..03999a004a2b581acc42cc6790691c455d60ca2a 100644 (file)
@@ -15,6 +15,9 @@ import math
 import re
 import shlex
 
+if sys.version_info.major < 3:
+   raise RuntimeError("cephfs-shell is only compatible with python3")
+
 try:
     from cmd2 import with_argparser
 except ImportError: