mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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.
This commit is contained in:
parent
5111e0c2f7
commit
dc8feb799c
1 changed files with 1 additions and 2 deletions
|
@ -60,7 +60,7 @@ if not os.path.exists(SW_REPORT):
|
||||||
# Pre-startup work
|
# Pre-startup work
|
||||||
if not os.path.exists(CACHE_DIR):
|
if not os.path.exists(CACHE_DIR):
|
||||||
os.mkdir(CACHE_DIR)
|
os.mkdir(CACHE_DIR)
|
||||||
os.chmod(CACHE_DIR, 0775)
|
os.chmod(CACHE_DIR, 2775)
|
||||||
|
|
||||||
# Helper functions
|
# Helper functions
|
||||||
#------------------------------
|
#------------------------------
|
||||||
|
@ -77,7 +77,6 @@ def spacewalk_report(name):
|
||||||
p = subprocess.Popen([SW_REPORT, name], stdout=fh)
|
p = subprocess.Popen([SW_REPORT, name], stdout=fh)
|
||||||
p.wait()
|
p.wait()
|
||||||
fh.close()
|
fh.close()
|
||||||
os.chmod(cache_filename, 0664)
|
|
||||||
|
|
||||||
lines = open(cache_filename, 'r').readlines()
|
lines = open(cache_filename, 'r').readlines()
|
||||||
keys = lines[0].strip().split(',')
|
keys = lines[0].strip().split(',')
|
||||||
|
|
Loading…
Reference in a new issue