Filippo Giunchedi has submitted this change and it was merged. Change subject: Upgrade to 0.1.25 ......................................................................
Upgrade to 0.1.25 Refs T145632 Change-Id: I5380418d616e398a33fce522455b72528e0cb100 --- M debian/changelog M setup.py M wikimedia_thumbor/logging/filter/context/context.py M wikimedia_thumbor/logging/filter/http404/http404.py 4 files changed, 21 insertions(+), 8 deletions(-) Approvals: Filippo Giunchedi: Looks good to me, approved jenkins-bot: Verified diff --git a/debian/changelog b/debian/changelog index 1f6b2df..0d8f61d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python-thumbor-wikimedia (0.1.25-1) jessie-wikimedia; urgency=low + + * New upstream release + + -- Gilles Dubuc <gil...@wikimedia.org> Mon, 10 OCt 2016 15:39:00 +0000 + python-thumbor-wikimedia (0.1.24-1) jessie-wikimedia; urgency=low * New upstream release diff --git a/setup.py b/setup.py index de14854..5ad4104 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name='wikimedia_thumbor', - version='0.1.24', + version='0.1.25', url='https://phabricator.wikimedia.org/diffusion/THMBREXT/', license='MIT', author='Gilles Dubuc, Wikimedia Foundation', diff --git a/wikimedia_thumbor/logging/filter/context/context.py b/wikimedia_thumbor/logging/filter/context/context.py index bd0f753..b6056cb 100644 --- a/wikimedia_thumbor/logging/filter/context/context.py +++ b/wikimedia_thumbor/logging/filter/context/context.py @@ -25,10 +25,13 @@ import re # Look for the port if we haven't found it yet if type(self).port == '????': - matches = re.match( - '.*thumbor running at \d+.\d+.\d+.\d+:([\d]+).*', - str(record.msg) - ) + try: + matches = re.match( + '.*thumbor running at \d+.\d+.\d+.\d+:([\d]+).*', + unicode(record.msg) + ) + except: + matches = None if matches: # It's a match, save the port and use it from this point on diff --git a/wikimedia_thumbor/logging/filter/http404/http404.py b/wikimedia_thumbor/logging/filter/http404/http404.py index 537560d..d643218 100644 --- a/wikimedia_thumbor/logging/filter/http404/http404.py +++ b/wikimedia_thumbor/logging/filter/http404/http404.py @@ -11,11 +11,15 @@ def filter(self, record): import re - matches = re.match('.*HTTP 404.*', str(record.msg)) + + try: + matches = re.match('.*HTTP 404.*', unicode(record.msg)) + except: + matches = None if self.flag == 'exclude': - return not matches + return not bool(matches) elif self.flag == 'only': - return matches + return bool(matches) return True -- To view, visit https://gerrit.wikimedia.org/r/315088 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5380418d616e398a33fce522455b72528e0cb100 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/python-thumbor-wikimedia Gerrit-Branch: master Gerrit-Owner: Gilles <gdu...@wikimedia.org> Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org> Gerrit-Reviewer: Gilles <gdu...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits