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
'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:
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']
# 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