Mailing List Archive

[PATCH] Fix syntax checking about xm dump-core

When I specified a wrong option to xm dump-core command,
the Traceback occurred.

# xm dump-core vm1 -xyz
Unexpected error: getopt.GetoptError

Please report to
Traceback (most recent call last):
File "/usr/sbin/xm", line 10, in ?
File "//usr/lib/python/xen/xm/", line 1332, in main
rc = cmd(args)
File "//usr/lib/python/xen/xm/", line 603, in xm_dump_core
(options, params) = getopt.gnu_getopt(args, 'LC', ['live','crash'])
File "/usr/lib/python2.3/", line 134, in gnu_getopt
opts, args = do_shorts(opts, args[0][1:], shortopts, args[1:])
File "/usr/lib/python2.3/", line 191, in do_shorts
if short_has_arg(opt, shortopts):
File "/usr/lib/python2.3/", line 207, in short_has_arg
raise GetoptError('option -%s not recognized' % opt, opt)
getopt.GetoptError: option -x not recognized

This patch fixes the cause of Traceback.

Signed-off-by: Masaki Kanno <>

Best regards,