Revision: 3893 Author: btongminh Date: 2007-07-20 14:18:11 +0000 (Fri, 20 Jul 2007)
Log Message: ----------- try: finally around the edit-lock.
Modified Paths: -------------- trunk/pywikipedia/delinker.py
Modified: trunk/pywikipedia/delinker.py =================================================================== --- trunk/pywikipedia/delinker.py 2007-07-19 23:18:06 UTC (rev 3892) +++ trunk/pywikipedia/delinker.py 2007-07-20 14:18:11 UTC (rev 3893) @@ -117,9 +117,10 @@ # Delink the image output(u'%s Delinking %s from %s' % (self, image, domain)) - result = self.replace_image(image, site, title, summary, replacement) - - self.CommonsDelinker.unset_edit(domain, title) + try: + result = self.replace_image(image, site, title, summary, replacement) + finally: + self.CommonsDelinker.unset_edit(domain, title) # Add to logging queue self.CommonsDelinker.Loggers.append((timestamp, image, domain, page_namespace, page_title, result, replacement))