From a25ea8d175f8c8cae8b2572a7b1e615035b42e8e Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Mon, 3 Apr 2023 08:59:25 +0200 Subject: [PATCH] conf: Do not error out if oscrc is owned by another user --- osc/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osc/conf.py b/osc/conf.py index 4f94851613..daec5a0beb 100644 --- a/osc/conf.py +++ b/osc/conf.py @@ -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