summaryrefslogtreecommitdiffstats
path: root/misc/ninja_syntax.py
diff options
context:
space:
mode:
Diffstat (limited to 'misc/ninja_syntax.py')
-rw-r--r--misc/ninja_syntax.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/misc/ninja_syntax.py b/misc/ninja_syntax.py
index b73a002..2e487d1 100644
--- a/misc/ninja_syntax.py
+++ b/misc/ninja_syntax.py
@@ -66,7 +66,12 @@ class Writer(object):
' '.join(all_inputs)))
if variables:
- for key, val in variables:
+ if isinstance(variables, dict):
+ iterator = variables.iteritems()
+ else:
+ iterator = iter(variables)
+
+ for key, val in iterator:
self.variable(key, val, indent=1)
return outputs