DrTrigon has submitted this change and it was merged.
Change subject: bugfix; solve cases where the PDF processing just hang and stopped the bot from continuing ......................................................................
bugfix; solve cases where the PDF processing just hang and stopped the bot from continuing
Change-Id: I33075a2663950533421f2d48f71ef77eed38962f --- M catimages.py 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: DrTrigon: Verified; Looks good to me, approved
diff --git a/catimages.py b/catimages.py index 516cf81..c751df5 100644 --- a/catimages.py +++ b/catimages.py @@ -2642,7 +2642,9 @@ #proc = Popen("pdftotext -layout %s %s" % (self.image_path, self.image_path+'.txt'), proc = Popen("pdftotext %s %s" % (self.image_path, self.image_path+'.txt'), shell=True, stderr=PIPE)#.stderr.readlines() + enable_recovery() # enable recovery from hard crash proc.wait() + disable_recovery() # disable since everything worked out fine if proc.returncode: raise ImportError("pdftotext not found!") data = open(self.image_path+'.txt', 'r').readlines()
pywikibot-commits@lists.wikimedia.org