From d5e76904193a4aa32ddc2d2d4b98504b0d4fdaf6 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Tue, 21 Apr 2015 00:01:23 +0200 Subject: [PATCH] Fix size comparison for RSS & HTML output. This was always broken, but somehow worked with Python 2.7 (WTF?). Now that we test with Pillow, this code path runs with Python 3 and throws an error. --- .travis.yml | 12 ++++++------ dosagelib/events.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index f265e5259..c1c977c6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,6 @@ python: - "2.7" - "3.3" - "3.4" -# whitelist -branches: - only: - - master # install libjpeg-dev for Pillow to handle JPEGs before_install: - sudo apt-get update -q -y @@ -19,5 +15,9 @@ install: - pip install pytest-xdist # command to run tests script: make test PYTESTOPTS="--tb=short -n10" -#notifications: -# email: false +notifications: + irc: + channels: + - "chat.freenode.net#dosage" + use_notice: true + skip_join: true diff --git a/dosagelib/events.py b/dosagelib/events.py index 888b2e81d..e36c41f8a 100644 --- a/dosagelib/events.py +++ b/dosagelib/events.py @@ -125,7 +125,7 @@ def getDimensionForImage(filename, maxsize): return None img = Image.open(filename) width, height = img.size - if width > maxsize: + if width > maxsize[0] or height > maxsize[1]: img.thumbnail(maxsize) out.info("Downscaled display size from %s to %s" % ((width, height), img.size)) return img.size