aboutsummaryrefslogtreecommitdiffstats
path: root/json_diff.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2012-04-24 01:51:21 +0200
committerMatěj Cepl <mcepl@redhat.com>2012-04-24 01:51:21 +0200
commit2229c24f95d502ff269deedc6c4b66aa30f8acd1 (patch)
tree2807a88561c20727c9e5a3964f067e23fa3fa2c5 /json_diff.py
parent34c29fee135803154c6bb494d908b98067f028e2 (diff)
downloadjson_diff-2229c24f95d502ff269deedc6c4b66aa30f8acd1.tar.gz
restore compatibility with py2.41.3.1
Diffstat (limited to 'json_diff.py')
-rwxr-xr-xjson_diff.py8
1 files changed, 4 insertions, 4 deletions
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