X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fqueue.py;fp=daklib%2Fqueue.py;h=e2ab8467b66ec7901e967e68e0ce513dd24dd8fa;hb=7de6bf94ac8324bfb62a6d7a5efc340dca894907;hp=8acfb4e7f198803d3f914c97c1e22df8a3f48b2f;hpb=e2e147e37599884d1a323d39b07e6a174bf79e41;p=dak.git diff --git a/daklib/queue.py b/daklib/queue.py index 8acfb4e7..e2ab8467 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 ...