1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

samba-tool: Ensure that samba-tool processes --name=not-existing does not error

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12705
This commit is contained in:
Andrew Bartlett 2017-03-24 13:07:06 +13:00
parent f21c17c6d0
commit a47a8e41bd
2 changed files with 5 additions and 2 deletions

View File

@ -60,7 +60,11 @@ class cmd_processes(Command):
msg_ctx = Messaging()
if name is not None:
ids = msg_ctx.irpc_servers_byname(name)
try:
ids = msg_ctx.irpc_servers_byname(name)
except KeyError:
ids = []
for server_id in ids:
self.outf.write("%d\n" % server_id.pid)
elif pid is not None:

View File

@ -319,4 +319,3 @@
^samba3.smb2.credits.skipped_mid.*
^samba4.blackbox.dbcheck-links.release-4-5-0-pre1.dangling_multi_valued_dbcheck
^samba4.blackbox.dbcheck-links.release-4-5-0-pre1.dangling_multi_valued_check_missing
^samba.tests.samba_tool.processes.samba.tests.samba_tool.processes.ProcessCmdTestCase.test_unknown_name\(ad_dc_ntvfs:local\)