mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Fix xm sched-credit when given an invalid domain name.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This commit is contained in:
1 parent
19bcd321c5
commit
0ea3c30b5b
1 file changed
+6
@@ -1144,6 +1144,9 @@ def xm_sched_sedf(args):
|
||||
doms = filter(lambda x : domid_match(domid, x),
|
||||
[parse_doms_info(dom)
|
||||
for dom in getDomains(None, 'running')])
|
||||
if domid is not None and doms == []:
|
||||
err("Domain '%s' does not exist." % domid)
|
||||
usage('sched-sedf')
|
||||
|
||||
# print header if we aren't setting any parameters
|
||||
if len(opts.keys()) == 0:
|
||||
@@ -1207,6 +1210,9 @@ def xm_sched_credit(args):
|
||||
for dom in getDomains(None, 'running')])
|
||||
|
||||
if weight is None and cap is None:
|
||||
if domid is not None and doms == []:
|
||||
err("Domain '%s' does not exist." % domid)
|
||||
usage('sched-credit')
|
||||
# print header if we aren't setting any parameters
|
||||
print '%-33s %-2s %-6s %-4s' % ('Name','ID','Weight','Cap')
|
||||
|
||||
|
||||