mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-04 02:26:16 +01:00
conf: Do not error out if oscrc is owned by another user
This commit is contained in:
parent
5ef74a6e3d
commit
a25ea8d175
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user