mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-16 07:56:21 +00:00
resolve connect.py string start with g bug
This commit is contained in:
parent
b1add204b6
commit
00f7346578
@ -365,6 +365,7 @@ def exec_cmd_servers(username):
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print_prompt()
|
print_prompt()
|
||||||
|
gid_pattern = re.compile(r'^g\d+$')
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
@ -378,7 +379,7 @@ if __name__ == '__main__':
|
|||||||
elif option in ['G', 'g']:
|
elif option in ['G', 'g']:
|
||||||
print_user_hostgroup(LOGIN_NAME)
|
print_user_hostgroup(LOGIN_NAME)
|
||||||
continue
|
continue
|
||||||
elif option.startswith('g') or option.startswith('G'):
|
elif gid_pattern.match(option):
|
||||||
gid = option[1:].strip()
|
gid = option[1:].strip()
|
||||||
print_user_hostgroup_host(LOGIN_NAME, gid)
|
print_user_hostgroup_host(LOGIN_NAME, gid)
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user