Show the usage message if invalid arguments are given to xm sysrq.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This commit is contained in:
Ewan Mellor committed 2006-09-14 07:55:27 +01:00
1 parent c7d036be92
commit 9a6d1bcab3
1 file changed
+3 -2
+3 -2
View File
@@ -24,8 +24,9 @@ def main(argv):
return
# no options for the moment
if len(args) < 1: opts.err('Missing domain')
if len(args) < 2: opts.err('Missing sysrq character')
if len(args) != 2:
opts.usage()
sys.exit(1)
dom = args[0]
req = ord(args[1][0])
server.xend.domain.send_sysrq(dom, req)
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.