cloud-init/cloud-init-0.6.2-runparts-emptydir.patch
Garrett Holmstrom 1a48e763cf Refresh patches
2011-10-04 12:21:05 -07:00

15 lines
529 B
Diff

Index: cloud-init-fedora/cloudinit/util.py
===================================================================
--- cloud-init-fedora.orig/cloudinit/util.py
+++ cloud-init-fedora/cloudinit/util.py
@@ -145,7 +145,8 @@ def getkeybyid(keyid,keyserver):
def runparts(dirp, skip_no_exist=True):
if skip_no_exist and not os.path.isdir(dirp): return
-
+ if os.path.isdir(dirp) and os.listdir(dirp) == []: return
+
cmd = [ 'run-parts', '--regex', '.*', dirp ]
sp = subprocess.Popen(cmd)
sp.communicate()