We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d71415a commit 5ee4bd2Copy full SHA for 5ee4bd2
planet/auth.py
@@ -263,14 +263,9 @@ def read(self) -> dict:
263
264
def _enforce_permissions(self):
265
'''if the file's permissions are not what they should be, fix them'''
266
- try:
+ if self.path.exists():
267
# in octal, permissions is the last three bits of the mode
268
file_permissions = self.path.stat().st_mode & 0o777
269
if file_permissions != self.permissions:
270
- LOGGER.debug(
271
- f'{self.path} permissions are {oct(file_permissions)}, '
272
- f'should be {oct(self.permissions)}. Fixing.')
+ LOGGER.info('Fixing planet secret file permissions.')
273
self.path.chmod(self.permissions)
274
- except FileNotFoundError:
275
- # just skip it if the secret file doesn't exist
276
- pass
0 commit comments