提交 08d56e24 编写于 作者: P Philipp Hahn 提交者: Eric Blake

example: Fix argument handling

sys.argv contains the original command line arguments, while args only
contains the arguments not handled by getopt(). Currently this is no
problem since --help is the only command line option passable, which
terminates the process, so the code is never reached. Any option added
in the future will reveal the bug.
Signed-off-by: NPhilipp Hahn <hahn@univention.de>
上级 5cf56c4b
......@@ -486,8 +486,8 @@ def main():
usage()
sys.exit()
if len(sys.argv) > 1:
uri = sys.argv[1]
if len(args) >= 1:
uri = args[0]
else:
uri = "qemu:///system"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册