aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Hart <matthew.hart@linaro.org>2015-08-14 15:50:49 +0100
committerLinaro Code Review <review@review.linaro.org>2015-08-14 15:06:53 +0000
commit7d33f40d0a011a8d54c87d68846e8a5e6efa1070 (patch)
tree4f94ca7e6e30114c95f4bbeba89bb7c39b3cd9b3
parent7c0934e6ebc538ada0d53e3120d916706e6a23b3 (diff)
check-git-repos: force the umask to 0022
Forces everything the script does to be umask 0022 and resets the umask once finished. Change-Id: I0f92aa6812e3dfb8d5770c0797dc37ef9d45782a
-rwxr-xr-xcheck-git-repos.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/check-git-repos.py b/check-git-repos.py
index 9d835fb..4b1d975 100755
--- a/check-git-repos.py
+++ b/check-git-repos.py
@@ -100,6 +100,7 @@ def process(paths):
if __name__ == '__main__':
+ oldumask = os.umask(0022)
parser = argparse.ArgumentParser(
description='Check git repositories')
parser.add_argument('--log', default='WARN',
@@ -109,3 +110,4 @@ if __name__ == '__main__':
log.setLevel(getattr(logging, args.log))
pathlist = get_repos()
process(pathlist)
+ os.umask(oldumask)