diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ninja_syntax.py | 2 | ||||
-rwxr-xr-x | misc/ninja_test.py | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/misc/ninja_syntax.py b/misc/ninja_syntax.py index 66babbe..3572dd9 100644 --- a/misc/ninja_syntax.py +++ b/misc/ninja_syntax.py @@ -71,7 +71,7 @@ class Writer(object): if variables: if isinstance(variables, dict): - iterator = variables.iteritems() + iterator = iter(variables.items()) else: iterator = iter(variables) diff --git a/misc/ninja_test.py b/misc/ninja_test.py index b56033e..2aef7ff 100755 --- a/misc/ninja_test.py +++ b/misc/ninja_test.py @@ -15,7 +15,11 @@ # limitations under the License. import unittest -from StringIO import StringIO + +try: + from StringIO import StringIO +except ImportError: + from io import StringIO import ninja_syntax |