diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-09-07 11:24:28 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-09-07 11:24:28 +0100 |
commit | 214523659d2433c54329411d06ce7dbbb95fa39b (patch) | |
tree | e4547c91c35590f8167f5ddfc282d150570ce9b2 /tools | |
parent | 95f83e447abc2fc37b671f341a81bed8a04506ad (diff) | |
download | xen-214523659d2433c54329411d06ce7dbbb95fa39b.tar.gz xen-214523659d2433c54329411d06ce7dbbb95fa39b.tar.bz2 xen-214523659d2433c54329411d06ce7dbbb95fa39b.zip |
xend: Fix error message for xm trigger command.
When I tested xm trigger command with a wrong argument, I saw the
following error message.
# xm trigger vm1 xyz
Error: __init__() takes exactly 2 arguments (3 given)
Usage: xm trigger <Domain> <nmi|reset|init> [<VCPU>]
Send a trigger to a domain.
This patch fixes the error message as follows.
# xm trigger vm1 xyz
Error: Invalid trigger: xyz
Usage: xm trigger <Domain> <nmi|reset|init> [<VCPU>]
Send a trigger to a domain.
The type of "TRIGGER_TYPE" is dictionary. domain_send_trigger()
refers to the keys of "TRIGGER_TYPE" without using keys() currently.
This patch adds keys() there.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/python/xen/xend/XendDomain.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 9947111a8b..083fd2464d 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -1594,10 +1594,10 @@ class XendDomain: raise VMBadState("Domain '%s' is not started" % domid, POWER_STATE_NAMES[DOM_STATE_RUNNING], POWER_STATE_NAMES[dominfo._stateGet()]) - if trigger_name.lower() in TRIGGER_TYPE: + if trigger_name.lower() in TRIGGER_TYPE.keys(): trigger = TRIGGER_TYPE[trigger_name.lower()] else: - raise XendError("Invalid trigger: %s", trigger_name) + raise XendError("Invalid trigger: %s" % trigger_name) try: return xc.domain_send_trigger(dominfo.getDomid(), trigger, |