Skip to content

Commit

Permalink
Fixes for compatibility with Python 2.4.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Lalancette <clalance@redhat.com>
  • Loading branch information
Chris Lalancette committed Mar 29, 2011
1 parent e884952 commit bb02833
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion oz-customize
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ try:
raise Exception, "libvirt XML file is too big!"

guest.customize(open(libvirt_xml_file, 'r').read())
except Exception as exc:
except Exception, exc:
if loglevel > logging.DEBUG:
print ""
print "ERROR: %s" % (str(exc))
Expand Down
2 changes: 1 addition & 1 deletion oz-generate-icicle
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ try:
raise Exception, "libvirt XML file is too big!"

print guest.generate_icicle(open(libvirt_xml_file, 'r').read())
except Exception as exc:
except Exception, exc:
if loglevel > logging.DEBUG:
print ""
print "ERROR: %s" % (str(exc))
Expand Down
13 changes: 7 additions & 6 deletions oz-install
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,12 @@ try:
if libvirt_xml is None:
guest.generate_install_media(force_download)
try:
guest.generate_diskimage()
libvirt_xml = guest.install(timeout)
except:
guest.cleanup_old_guest()
raise
try:
guest.generate_diskimage()
libvirt_xml = guest.install(timeout)
except:
guest.cleanup_old_guest()
raise
finally:
guest.cleanup_install()

Expand All @@ -150,7 +151,7 @@ try:
filename = guest.name + time.strftime("%b_%d_%Y-%H:%M:%S")
open(filename, 'w').write(libvirt_xml)
print "Libvirt XML was written to " + filename
except Exception as exc:
except Exception, exc:
if loglevel > logging.DEBUG:
print ""
print "ERROR: %s" % (str(exc))
Expand Down
3 changes: 2 additions & 1 deletion oz.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ Requires: libvirt-python
# unless/until we are able to make it really be remote.
Requires: libvirt
Requires: python-pycurl
Requires: genisoimage
Requires: mkisofs
Requires: numpy
Requires: mtools
Requires: python-uuid

%description
Oz is a set of libraries and utilities for doing automated guest OS
Expand Down

0 comments on commit bb02833

Please sign in to comment.