Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit 4f3b47d

Browse files
committed
Stored the quantum commands list to the variable.
By storing the quantum commands list to the variable, the subclass can depend the quantum shell to parse the command. Fixes: bug 1116837 Change-Id: I0a6f3226d326cf015e262e4ddf364d6f9a91d041
1 parent aa41734 commit 4f3b47d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

quantumclient/shell.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ def __init__(self, apiversion):
232232
description=__doc__.strip(),
233233
version=VERSION,
234234
command_manager=CommandManager('quantum.cli'), )
235-
for k, v in COMMANDS[apiversion].items():
235+
self.commands = COMMANDS
236+
for k, v in self.commands[apiversion].items():
236237
self.command_manager.add_command(k, v)
237238

238239
# This is instantiated in initialize_app() only when using
@@ -383,7 +384,7 @@ def run(self, argv):
383384
if arg == 'bash-completion':
384385
self._bash_completion()
385386
return 0
386-
if arg in COMMANDS[self.api_version]:
387+
if arg in self.commands[self.api_version]:
387388
if command_pos == -1:
388389
command_pos = index
389390
elif arg in ('-h', '--help'):

0 commit comments

Comments
 (0)