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()

-- 
To view, visit https://gerrit.wikimedia.org/r/97297
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I33075a2663950533421f2d48f71ef77eed38962f
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: DrTrigon <[email protected]>
Gerrit-Reviewer: DrTrigon <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to