From dc8feb799c956fc31ca52cb40ce7368031e31650 Mon Sep 17 00:00:00 2001 From: Jon Miller Date: Tue, 21 May 2013 14:44:00 -0700 Subject: [PATCH] Do not need to chmod cache file each time This is particularly important if you've manually ensured you have write access via group permissions and not by owner. --- plugins/inventory/spacewalk.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/inventory/spacewalk.py b/plugins/inventory/spacewalk.py index 4364419ed8..89e045056c 100755 --- a/plugins/inventory/spacewalk.py +++ b/plugins/inventory/spacewalk.py @@ -60,7 +60,7 @@ if not os.path.exists(SW_REPORT): # Pre-startup work if not os.path.exists(CACHE_DIR): os.mkdir(CACHE_DIR) - os.chmod(CACHE_DIR, 0775) + os.chmod(CACHE_DIR, 2775) # Helper functions #------------------------------ @@ -77,7 +77,6 @@ def spacewalk_report(name): p = subprocess.Popen([SW_REPORT, name], stdout=fh) p.wait() fh.close() - os.chmod(cache_filename, 0664) lines = open(cache_filename, 'r').readlines() keys = lines[0].strip().split(',')