~ubuntu-branches/ubuntu/quantal/virtinst/quantal-updates

« back to all changes in this revision

Viewing changes to virt-image

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-07-24 08:52:01 UTC
  • mfrom: (1.6.8 sid)
  • Revision ID: package-import@ubuntu.com-20120724085201-q3h0cbabg4t46gfm
Tags: 0.600.2-1ubuntu1
* Merge from debian unstable. Remaining changes:
  - debian/patches/9003-fix-path-to-hvmloader-in-testsuite.patch: adjust
    testsuite for 0001-fix-path-to-hvmloader.patch and
    0002-Fix-path-to-pygrub.patch.
  - debian/patches/9004_ubuntu_fix_tree_support.patch: Fix tree detection
    for all ISO/HTTP source, to not longer fail with cobbler/koan.
  - debian/patches/0004-Fix-path-to-qemu-dm.patch: fix the path to the
    qemu-dm binary.
  - debian/{control,rules,pyversions}: Build using dh_python2, use
    debhelper v8 instead of cdbs; for some reason the package build an
    empty binary package when using dh_python2.
  - debian/control: added acl package to depends.
  - debian/control: added libvirt-bin to recommends
* Dropped patches:
  - debian/patches/9005_ubuntu_releases.patch: Upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
 
126
126
    return options
127
127
 
128
 
def main():
 
128
def main(conn=None):
129
129
    cli.earlyLogging()
130
130
    options = parse_args()
131
131
 
133
133
    cli.setupLogging("virt-image", options.debug, options.quiet)
134
134
    cli.set_prompt(False)
135
135
 
136
 
    conn = cli.getConnection(options.connect)
 
136
    if conn is None:
 
137
        conn = cli.getConnection(options.connect)
137
138
 
138
139
    try:
139
140
        image = virtinst.ImageParser.parse_file(options.image)
183
184
    if options.print_only:
184
185
        start_xml, final_xml = guest.start_install(return_xml=True)
185
186
        print_stdout(start_xml or final_xml, do_force=True)
186
 
        return
 
187
        return 0
187
188
 
188
189
    meter = progress.TextMeter(fo=sys.stdout)
189
190
 
202
203
        fail(e, do_exit=False)
203
204
        cli.install_fail(guest)
204
205
 
 
206
    return 0
 
207
 
205
208
if __name__ == "__main__":
206
209
    try:
207
 
        main()
 
210
        sys.exit(main())
208
211
    except SystemExit, sys_e:
209
212
        sys.exit(sys_e.code)
210
213
    except KeyboardInterrupt: