Commit Graph

7 Commits (bbf29137282769f6c96123fe92babe41ea64e625)

Author SHA1 Message Date
Pavlo Shchelokovskyy 8415baf6cc Enable E265 style check
block comment should start with '# '

Change-Id: Iffae1b10e81b12ca8455139eae609ddca5e8dd09
2015-01-05 11:58:27 +02:00
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
Jason Dunsmore af464c9afc Make the first line of every file consistent.
Change-Id: I2e1a809cfca8e88693551d58d33e747f54ee5eb1
2014-03-04 09:03:04 -06:00
Steven Dake 715e5d4f51 Revert "Replace part_handler.py with write-files cloudinit mechanism"
Ubuntu has 0.6 of cloudinit, and write-files doesn't work on that
distro.  Ubuntu does not intend to update cloudinit in their LTS release
to 0.7.

This reverts commit 621f5bfdba.
Fixes: Bug #1207088

Change-Id: If80863883afee28bdde6dd506826ec5710cc0308
2013-08-05 12:13:59 -05:00
Steven Dake 621f5bfdba Replace part_handler.py with write-files cloudinit mechanism
part-handler.py was acting as a write-files mechanism.  Instead just
use the write-files mechanism directly to avoid the complexities of
the part-handler.

blueprint: use-cloudinit-write
Change-Id: I6e80c344743d6fd2fa9a49507de6d50e3d9eea73
2013-07-30 15:24:08 -07:00
Dirk Mueller 234a1f0f2e Add missing Aapche 2.0 license headers (H102)
Satisfy Hacking check of Hacking 0.6 or newer.

Change-Id: I01d9b44c1681142ef91fd91f678e173239ae6c98
2013-07-19 23:10:25 +02:00
Steven Dake db4bbad6a0 Rename part-handler.py to part_handler.py so it can be imported
Change-Id: I9e7e3be2f3155f3e35b2defdb89e9d84a02ae7cb
2013-07-10 14:39:27 -07:00