aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarKrytarik Raido <krytarik@gmail.com>2024-05-17 00:56:04 +0200
committerLibravatarKrytarik Raido <krytarik@gmail.com>2024-05-17 00:56:04 +0200
commitb2b0bf38ddbee1158d91be4de5febc1f7939a860 (patch)
treec13b6a07278ee744b03de0b1062849f7a878aa6f
parentad12a309987683f89d7e6ac70defbc38b9d44c81 (diff)
Fix infinite loop on faulty Changes files.
LP: #1835212
-rwxr-xr-xmini-dinstall5
1 files changed, 4 insertions, 1 deletions
diff --git a/mini-dinstall b/mini-dinstall
index a7b7363..157e46f 100755
--- a/mini-dinstall
+++ b/mini-dinstall
@@ -667,17 +667,20 @@ class IncomingDir(threading.Thread):
# do we have anything to reprocess?
for (changefilename, (starttime, nexttime, delay)) in list(self._reprocess_queue.items()):
curtime = time.time()
+ if changefilename in fucked:
+ self._logger.warn('Skipping screwed Changes file "%s"' % changefilename)
+ continue
try:
changefile = ChangeFile()
changefile.load_from_file(changefilename)
except (ChangeFileException, IOError) as e:
if not os.path.exists(changefilename):
self._logger.info('Changes file "%s" got removed' % changefilename)
+ del self._reprocess_queue[changefilename]
else:
self._logger.exception('Unable to load Changes file "%s"' % changefilename)
self._logger.warn('Marking "%s" as screwed' % changefilename)
fucked.append(changefilename)
- del self._reprocess_queue[changefilename]
continue
if curtime - starttime > self._max_retry_time:
# We've tried too many times; reject it.