mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
bitkeeper revision 1.1159.1.293 (4180123d6fy9CmhZFhA2dxg-C2tnig)
create.py: Set the name of the vm to the config file's basename if no name is specified in the config file or on the commandline. opts.py: Handle trailing getopt arguments correctly.
This commit is contained in:
1 parent
eb7ab5175a
commit
9cca9d355b
2 files changed
+5
No files matched your search
@@ -465,6 +465,8 @@ def main(argv):
|
||||
else:
|
||||
opts.load_defconfig()
|
||||
preprocess(opts, opts.vals)
|
||||
if not opts.getopt('name') and opts.getopt('defconfig'):
|
||||
opts.setopt('name', os.path.basename(opts.getopt('defconfig')))
|
||||
config = make_config(opts.vals)
|
||||
if opts.vals.dryrun:
|
||||
PrettyPrint.prettyprint(config)
|
||||
|
||||
@@ -313,6 +313,9 @@ class Opts:
|
||||
print >>sys.stderr, "Error: Unknown option:", k
|
||||
self.usage()
|
||||
|
||||
if not args:
|
||||
break
|
||||
|
||||
# then process the 1st arg
|
||||
(arg,args) = (args[0], args[1:])
|
||||
|
||||
|
||||