From b3d508df97b6bb77732a5c1cc558e6cb3f1dd4c8 Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Sat, 21 Nov 2020 15:34:38 +0100 Subject: tracker_data.py: Use explicitly octal mode on mkdir call Although this is probably subject to personal preference, switch to octal representation directly instead of specifying the mode in decimal variant. Reading 0o700 makes it immediately clear what is meant. --- bin/tracker_data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/tracker_data.py b/bin/tracker_data.py index a3eb2b3d23..f0bbb0de70 100644 --- a/bin/tracker_data.py +++ b/bin/tracker_data.py @@ -76,9 +76,9 @@ class TrackerData(object): self.DATA_URL)) response = requests.get(self.DATA_URL, allow_redirects=True) response.raise_for_status() - # if ~/.cache does not exist, then open() will fail; dec 448 -> octal 0700 + # if ~/.cache does not exist, then open() will fail if not os.path.exists(self.cached_data_dir): - os.mkdir(self.cached_data_dir, mode=448) + os.mkdir(self.cached_data_dir, mode=0o700) with open(self.cached_data_path, 'w') as cache_file: cache_file.write(response.text) with open(self.cached_revision_path, 'w') as rev_file: -- cgit v1.2.3