From 259efc04fdafe11a4e3553412f5977fe21841153 Mon Sep 17 00:00:00 2001 From: tharvik Date: Mon, 3 Oct 2016 15:19:20 +0200 Subject: [PATCH] add check on py version instead of try/expect --- toml_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toml_test.py b/toml_test.py index f399c05..706cede 100755 --- a/toml_test.py +++ b/toml_test.py @@ -5,10 +5,10 @@ import json import sys import toml -try: +if sys.version_info < (3,): _range = xrange iteritems = dict.iteritems -except NameError: +else: unicode = str _range = range basestring = str