From: Venky Shankar Date: Thu, 28 Sep 2023 07:55:46 +0000 (+0530) Subject: doc/cephfs-shell: drop installing packaging module X-Git-Tag: v19.0.0~255^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5be9213738bfbde12172b3a5158667ebe9dfa13d;p=ceph.git doc/cephfs-shell: drop installing packaging module Signed-off-by: Venky Shankar --- diff --git a/doc/man/8/cephfs-shell.rst b/doc/man/8/cephfs-shell.rst index 91136f123b6c..974ba37d9110 100644 --- a/doc/man/8/cephfs-shell.rst +++ b/doc/man/8/cephfs-shell.rst @@ -56,7 +56,7 @@ Options .. code:: bash - [build]$ python3 -m venv venv && source venv/bin/activate && pip3 install cmd2 colorama packaging + [build]$ python3 -m venv venv && source venv/bin/activate && pip3 install cmd2 colorama [build]$ source vstart_environment.sh && source venv/bin/activate && python3 ../src/tools/cephfs/shell/cephfs-shell Commands diff --git a/src/tools/cephfs/shell/cephfs-shell b/src/tools/cephfs/shell/cephfs-shell index d1726940ffde..d2c050f89316 100755 --- a/src/tools/cephfs/shell/cephfs-shell +++ b/src/tools/cephfs/shell/cephfs-shell @@ -1701,11 +1701,11 @@ def read_shell_conf(shell, shell_conf_file): sec = 'cephfs-shell' opts = [] - if version.parse(cmd2_version) >= version.parse("0.10.0"): + if Version(cmd2_version) >= Version("0.10.0"): for attr in shell.settables.keys(): opts.append(attr) else: - if version.parse(cmd2_version) <= version.parse("0.9.13"): + if Version(cmd2_version) <= Version("0.9.13"): # hardcoding options for 0.7.9 because - # 1. we use cmd2 v0.7.9 with teuthology and # 2. there's no way distinguish between a shell setting and shell @@ -1714,7 +1714,7 @@ def read_shell_conf(shell, shell_conf_file): 'continuation_prompt', 'debug', 'echo', 'editor', 'feedback_to_output', 'locals_in_py', 'prompt', 'quiet', 'timing'] - elif version.parse(cmd2_version) >= version.parse("0.9.23"): + elif Version(cmd2_version) >= Version("0.9.23"): opts.append('allow_style') # no equivalent option was defined by cmd2. else: @@ -1769,7 +1769,7 @@ def manage_args(): args.exe_and_quit = False # Execute and quit, don't launch the shell. if args.batch: - if version.parse(cmd2_version) <= version.parse("0.9.13"): + if Version(cmd2_version) <= Version("0.9.13"): args.commands = ['load ' + args.batch, ',quit'] else: args.commands = ['run_script ' + args.batch, ',quit'] @@ -1814,7 +1814,7 @@ def execute_cmds_and_quit(args): # value to indicate whether the execution of the commands should stop, but # since 0.9.7 it returns the return value of do_* methods only if it's # not None. When it is None it returns False instead of None. - if version.parse(cmd2_version) <= version.parse("0.9.6"): + if Version(cmd2_version) <= Version("0.9.6"): stop_exec_val = None else: stop_exec_val = False