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:
Ewan Mellor committed 2007-02-06 16:05:29 +00:00
1 parent 19bcd321c5
commit 0ea3c30b5b
1 file changed
+6
+6
View File
@@ -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')
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.