mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-07 05:38:43 +02:00
conf: Do not error out if oscrc is owned by another user
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user