heat/heat/cloudinit
Zane Bitter 95ec13c572 Fix cloud-init Python syntax for Python < 2.6
The loguserdata.py file gets uploaded to the servers created by Heat to run
under cloud-init. Since the default versions of Python installed on the
user's server may be very old (e.g. RHEL 5 defaults to Python 2.4), avoid
using the octal syntax introduced for Python 3.0 and backported only as far
as Python 2.6. (Also avoid the old syntax, which will break on Python 3.x.)

Also remove use of the "with" statement from loguserdata.py and
part-handler.py. This statement is only available from Python 2.6 on (or in
Python 2.5 via "from __future__ import with_statement").

Finally, remove use of the "except ExceptionType as value" syntax for
catching exceptions. Again, this was only backported to Python 2.6.

Change-Id: I89e86d00993d51e2514b1e589503c6d966909403
Partial-Bug: #1375864
2014-10-01 15:16:45 -04:00
..
__init__.py Refactor loguserdata.py so it can be tested. 2013-02-07 08:45:18 +13:00
boothook.sh Don't create cloud-init user unless specified 2014-03-25 05:01:11 -04:00
config Don't create cloud-init user unless specified 2014-03-25 05:01:11 -04:00
loguserdata.py Fix cloud-init Python syntax for Python < 2.6 2014-10-01 15:16:45 -04:00
part_handler.py Fix cloud-init Python syntax for Python < 2.6 2014-10-01 15:16:45 -04:00