From d7a557571ce1d00ec29aaf7b61163416c644ee72 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Wed, 23 Apr 2014 10:50:54 +0200
Subject: [PATCH 1/2] Compatibility with six 1.3.0
---
src/greplin/scales/formats_test.py | 6 +++---
src/greplin/scales/util.py | 6 +++++-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/greplin/scales/formats_test.py b/src/greplin/scales/formats_test.py
index 0376e94..d2534e2 100644
--- a/src/greplin/scales/formats_test.py
+++ b/src/greplin/scales/formats_test.py
@@ -83,10 +83,10 @@ class UnicodeFormatTest(unittest.TestCase):
out = six.StringIO()
formats.htmlFormat(out, statDict={'name': self.UNICODE_VALUE})
result = out.getvalue()
- if six.PY2:
- value = self.UNICODE_VALUE.encode('utf8')
- else:
+ if six.PY3:
value = self.UNICODE_VALUE
+ else:
+ value = self.UNICODE_VALUE.encode('utf8')
self.assertTrue(value in result)
diff --git a/src/greplin/scales/util.py b/src/greplin/scales/util.py
index 93af7eb..500afb8 100644
--- a/src/greplin/scales/util.py
+++ b/src/greplin/scales/util.py
@@ -14,7 +14,11 @@
"""Useful utility functions and objects."""
-from six.moves.queue import Queue
+import six
+if six.PY3:
+ import queue as Queue
+else:
+ import Queue
from math import exp
import logging
--
1.8.3.1