use dict keys for hint in oom-sort
Using dict keys avoids bugs like typos in the hint. This fixes the typo oom-sore_adj instead of oom_score_adj ("-" instead of "_" and a missing "c").
This commit is contained in:
parent
953b41aa9f
commit
3f68954dc4
@ -96,9 +96,7 @@ sort_by = args.sort
|
|||||||
|
|
||||||
|
|
||||||
if sort_by not in sort_dict:
|
if sort_by not in sort_dict:
|
||||||
print('Invalid -s/--sort value. Valid values are:\nPID\noom_scor'
|
print('Invalid -s/--sort value. Valid values are:\n' + '\n'.join(sort_dict) + '\n default is oom_score')
|
||||||
'e [default value]\noom-sore_adj\nUID\nName\ncmdline\nVmR'
|
|
||||||
'SS\nVmSwap')
|
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user