projects
/
kamaki
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add name and uuid of session user to shell greet
[kamaki]
/
kamaki
/
cli
/
__init__.py
diff --git
a/kamaki/cli/__init__.py
b/kamaki/cli/__init__.py
index
8310e9a
..
093d332
100644
(file)
--- a/
kamaki/cli/__init__.py
+++ b/
kamaki/cli/__init__.py
@@
-473,7
+473,12
@@
def run_one_cmd(exe_string, parser, auth_base, cloud):
def run_shell(exe_string, parser, auth_base, cloud):
from command_shell import _init_shell
def run_shell(exe_string, parser, auth_base, cloud):
from command_shell import _init_shell
- shell = _init_shell(exe_string, parser)
+ try:
+ username, userid = (
+ auth_base.user_term('name'), auth_base.user_term('id'))
+ except Exception:
+ username, userid = '', ''
+ shell = _init_shell(exe_string, parser, username, userid)
_load_all_commands(shell.cmd_tree, parser.arguments)
shell.run(auth_base, cloud, parser)
_load_all_commands(shell.cmd_tree, parser.arguments)
shell.run(auth_base, cloud, parser)