User:WindBOT/Filters: Difference between revisions

Jump to navigation Jump to search
m (→‎PNGCrush/jpegtran all PNG/JPG images: Don't laff Mousse I know you did that too >:3)
mNo edit summary
Line 336: Line 336:
           else:
           else:
               return content
               return content
           if True: # This is a high-risk filter, lots of I/O, so wrap it in a big try
           try: # This is a high-risk filter, lots of I/O, so wrap it in a big try
               filePage = wikitools.wikifile.File(wiki(), article.title)
               filePage = wikitools.wikifile.File(wiki(), article.title)
               hashes = [u'', u'']
               hashes = [u'', u'']
Line 379: Line 379:
                   content = content.strip() + u'\n\n' + hashTemplate
                   content = content.strip() + u'\n\n' + hashTemplate
               self.deleteFile(tempOutput)
               self.deleteFile(tempOutput)
           else:
           except:
               pass # Well, that didn't work
               pass # Well, that didn't work
           return content
           return content
   addFileFilter(imageCrushFilter())
   addFileFilter(imageCrushFilter())