Skip to content

Commit

Permalink
Dropping python 2.6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermef committed Feb 19, 2015
1 parent 01b0c64 commit 09ec9c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
language: python
python:
- "2.7_with_system_site_packages"
- "2.6"
- "3.2"

matrix:
fast_finish: true
allow_failures:
- python: "2.6"
- python: "3.2"

install:
Expand Down
6 changes: 3 additions & 3 deletions thumbor/handlers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from thumbor.engines import BaseEngine
from thumbor.engines.gif import Engine as GifEngine
from thumbor.engines.json_engine import JSONEngine
from thumbor.utils import logger, total_seconds_of
from thumbor.utils import logger
import thumbor.filters

CONTENT_TYPE = {
Expand Down Expand Up @@ -59,7 +59,7 @@ def execute_image_operations(self):
start = datetime.datetime.now()
result = self.context.modules.result_storage.get()
finish = datetime.datetime.now()
self.context.statsd_client.timing('result_storage.incoming_time', total_seconds_of(finish - start) * 1000)
self.context.statsd_client.timing('result_storage.incoming_time', (finish - start).total_seconds() * 1000)
if result is None:
self.context.statsd_client.incr('result_storage.miss')
else:
Expand Down Expand Up @@ -262,7 +262,7 @@ def finish_request(self, context, result=None):
context.modules.result_storage.put(results)
finish = datetime.datetime.now()
context.statsd_client.incr('result_storage.bytes_written', len(results))
context.statsd_client.timing('result_storage.outgoing_time', total_seconds_of(finish - start) * 1000)
context.statsd_client.timing('result_storage.outgoing_time', (finish - start).total_seconds() * 1000)

def optimize(self, context, image_extension, results):
for optimizer in context.modules.optimizers:
Expand Down

0 comments on commit 09ec9c9

Please sign in to comment.