[dak/master] Ignore 'Operation not permitted' error.
Signed-off-by: Torsten Werner <twerner@debian.org>
---
daklib/queue.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/daklib/queue.py b/daklib/queue.py
index 8acfb4e..e2ab846 100755
--- a/daklib/queue.py
+++ b/daklib/queue.py
@@ -2432,7 +2432,12 @@ distribution."""
self.force_reject(reject_files)
# Change permissions of the .changes file to be world readable
- os.chmod(changesfile, os.stat(changesfile).st_mode | stat.S_IROTH)
+ try:
+ os.chmod(changesfile, os.stat(changesfile).st_mode | stat.S_IROTH)
+ except OSError as (errno, strerror):
+ # Ignore 'Operation not permitted' error.
+ if errno != 1:
+ raise
# If we fail here someone is probably trying to exploit the race
# so let's just raise an exception ...
--
1.7.2.5
Reply to: