diff options
-rw-r--r-- | NEWS.txt | 3 | ||||
-rwxr-xr-x | json_diff.py | 8 | ||||
-rw-r--r-- | test/test_json_diff.py | 1 |
3 files changed, 7 insertions, 5 deletions
@@ -1,3 +1,6 @@ +1.3.1 2012-04-24 + * Back to the past: previous version was not compatible with Python 2.4. + 1.3.0 2012-04-24 * Added -o parameter for output to the specified file. diff --git a/json_diff.py b/json_diff.py index 0d191d1..fb0808b 100755 --- a/json_diff.py +++ b/json_diff.py @@ -23,7 +23,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -from __future__ import print_function +# Don't do anything silly ... this should be compatible with python 2.4! try: import json except ImportError: @@ -33,7 +33,7 @@ import logging from optparse import OptionParser __author__ = "Matěj Cepl" -__version__ = "1.3.0" +__version__ = "1.3.1" logging.basicConfig(format='%(levelname)s:%(funcName)s:%(message)s', level=logging.INFO) @@ -362,10 +362,10 @@ def main(sys_args): if options.HTMLoutput: # we want to hardcode UTF-8 here, because that's what's # in <meta> element of the generated HTML - print(unicode(HTMLFormatter(diff_res)).encode("utf-8"), file=outf) + print >>outf, unicode(HTMLFormatter(diff_res)).encode("utf-8") else: outs = json.dumps(diff_res, indent=4, ensure_ascii=False) - print(outs.encode("utf-8"), file=outf) + print >>outf, outs.encode("utf-8") if len(diff_res) > 0: return 1 diff --git a/test/test_json_diff.py b/test/test_json_diff.py index d7c16e3..cbcc056 100644 --- a/test/test_json_diff.py +++ b/test/test_json_diff.py @@ -2,7 +2,6 @@ """ PyUnit unit tests """ -from __future__ import print_function import unittest import sys import tempfile |