Skip to content

Commit

Permalink
conf: Do not error out if oscrc is owned by another user
Browse files Browse the repository at this point in the history
  • Loading branch information
dmach committed Apr 3, 2023
1 parent 5ef74a6 commit a25ea8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,8 +772,8 @@ def get_config(override_conffile=None,
try:
os.chmod(conffile, 0o600)
except OSError as e:
if e.errno == errno.EROFS:
print('Warning: file \'%s\' may have an insecure mode.', conffile)
if e.errno in (errno.EROFS, errno.EPERM):
print(f"Warning: Configuration file '{conffile}' may have insecure file permissions.")
else:
raise e

Expand Down

0 comments on commit a25ea8d

Please sign in to comment.