[Git][security-tracker-team/security-tracker][master] tracker_data.py: Use explicitly octal mode on mkdir call
Salvatore Bonaccorso
carnil at debian.org
Sat Nov 21 15:46:18 GMT 2020
Salvatore Bonaccorso pushed to branch master at Debian Security Tracker / security-tracker
Commits:
4108d88d by Salvatore Bonaccorso at 2020-11-21T16:45:47+01:00
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.
- - - - -
1 changed file:
- bin/tracker_data.py
Changes:
=====================================
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:
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/-/commit/4108d88d2aa8b95c08f346f8c27e0aed8e0d3b14
--
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/-/commit/4108d88d2aa8b95c08f346f8c27e0aed8e0d3b14
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-security-tracker-commits/attachments/20201121/4479eb1f/attachment.html>
More information about the debian-security-tracker-commits
mailing list