Skip to content
Snippets Groups Projects
Commit 40a79a96 authored by Jan David Mol's avatar Jan David Mol
Browse files

SW-644: Upgraded scripts python2->3

parent 076bff07
Branches
Tags
No related merge requests found
...@@ -159,10 +159,10 @@ class DBCredentials: ...@@ -159,10 +159,10 @@ class DBCredentials:
# make sure the files are mode 600 to hide passwords # make sure the files are mode 600 to hide passwords
for file in self.files: for file in self.files:
if oct(stat(file).st_mode & 0777) != '0600': if oct(stat(file).st_mode & 0o777) != '0o600':
logger.info('Changing permissions of %s to 600' % file) logger.info('Changing permissions of %s to 600' % file)
try: try:
chmod(file, 0600) chmod(file, 0o600)
except Exception as e: except Exception as e:
logger.error('Error: Could not change permissions on %s: %s' % (file, str(e))) logger.error('Error: Could not change permissions on %s: %s' % (file, str(e)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment