Merge lp:~harlowja/cloud-init/rework into lp:~cloud-init-dev/cloud-init/trunk

Proposed by Joshua Harlow
Status: Merged
Merged at revision: 589
Proposed branch: lp:~harlowja/cloud-init/rework
Merge into: lp:~cloud-init-dev/cloud-init/trunk
Diff against target: 43 lines (+13/-1)
3 files modified
TODO (+9/-0)
cloudinit/helpers.py (+3/-0)
cloudinit/util.py (+1/-1)
To merge this branch: bzr merge lp:~harlowja/cloud-init/rework
Reviewer Review Type Date Requested Status
cloud-init Commiters Pending
Review via email: mp+114242@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'TODO'
--- TODO 2012-07-06 17:53:35 +0000
+++ TODO 2012-07-10 18:30:32 +0000
@@ -35,3 +35,12 @@
35 something to remove later, and just recommend using 'chroot' instead (or the X 35 something to remove later, and just recommend using 'chroot' instead (or the X
36 different other options which are similar to 'chroot'), which is might be more 36 different other options which are similar to 'chroot'), which is might be more
37 natural and less confusing...37 natural and less confusing...
38- Instead of just warning when a module is being ran on a 'unknown' distribution
39 perhaps we should not run that module in that case? Or we might want to start
40 reworking those modules so they will run on all distributions? Or if that is
41 not the case, then maybe we want to allow fully specified python paths for
42 modules and start encouraging packages of 'ubuntu' modules, packages of 'rhel'
43 specific modules that people can add instead of having them all under the
44 cloud-init 'root' tree? This might encourage more development of other modules
45 instead of having to go edit the cloud-init code to accomplish this.
46
3847
=== modified file 'cloudinit/helpers.py'
--- cloudinit/helpers.py 2012-06-29 20:20:09 +0000
+++ cloudinit/helpers.py 2012-07-10 18:30:32 +0000
@@ -67,6 +67,9 @@
67 def __init__(self, fn):67 def __init__(self, fn):
68 self.fn = fn68 self.fn = fn
6969
70 def __str__(self):
71 return "<%s using file %r>" % (util.obj_name(self), self.fn)
72
7073
71class FileSemaphores(object):74class FileSemaphores(object):
72 def __init__(self, sem_path):75 def __init__(self, sem_path):
7376
=== modified file 'cloudinit/util.py'
--- cloudinit/util.py 2012-07-09 19:08:27 +0000
+++ cloudinit/util.py 2012-07-10 18:30:32 +0000
@@ -828,7 +828,7 @@
828 if _CLOUD_INIT_SAVE_STDIN is set in environment to a non empty or '0' value828 if _CLOUD_INIT_SAVE_STDIN is set in environment to a non empty or '0' value
829 then input will not be closed (only useful potentially for debugging).829 then input will not be closed (only useful potentially for debugging).
830 """830 """
831 if os.environ.get("_CLOUD_INIT_SAVE_STDIN") in ("", "0", 'False'):831 if is_false(os.environ.get("_CLOUD_INIT_SAVE_STDIN")):
832 return832 return
833 with open(os.devnull) as fp:833 with open(os.devnull) as fp:
834 os.dup2(fp.fileno(), sys.stdin.fileno())834 os.dup2(fp.fileno(), sys.stdin.fileno())