1
0
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:
Daniel Mach 2023-04-03 08:59:25 +02:00
parent 5ef74a6e3d
commit a25ea8d175

View File

@ -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