mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-01 11:26:42 +07:00
tools/kvm_stat: remove pid filter on empty input
Improve consistency in the interactive dialogue for pid filtering by removing any filters on empty input (in addition to entering 0). Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.vnet.ibm.com> Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
This commit is contained in:
parent
a24e85f6a6
commit
be03ea3b77
@ -991,10 +991,13 @@ class Tui(object):
|
|||||||
curses.noecho()
|
curses.noecho()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
pid = int(pid)
|
if len(pid) > 0:
|
||||||
if pid != 0 and not os.path.isdir(os.path.join('/proc/',
|
pid = int(pid)
|
||||||
str(pid))):
|
if pid != 0 and not os.path.isdir(os.path.join('/proc/',
|
||||||
continue
|
str(pid))):
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
pid = 0
|
||||||
self.refresh_header(pid)
|
self.refresh_header(pid)
|
||||||
self.update_pid(pid)
|
self.update_pid(pid)
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user