summaryrefslogtreecommitdiff
path: root/piglit-print-commands.py
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2014-02-24 11:42:38 -0800
committerDylan Baker <baker.dylan.c@gmail.com>2014-03-12 14:39:32 -0700
commitebae9e613976de548efb8c8e3de76f438ca94caf (patch)
tree012a3d2380327a6c286b01bcdd10ddfe153cea8d /piglit-print-commands.py
parentdc9345d0465609ceb32944b22eb6602831ba54bd (diff)
python: Convert from print statement to function
One of the biggest changes between python2 and python3 is that print changed from a statement to a function. This change was backported to python2 in the __future__ module, and this patch makes that conversation to ease the transition from python2 to python3. v2: - Replace dict comprehension with dict(generator). This is for python 2.6 compatability Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
Diffstat (limited to 'piglit-print-commands.py')
-rwxr-xr-xpiglit-print-commands.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/piglit-print-commands.py b/piglit-print-commands.py
index d49e5d92d..452960815 100755
--- a/piglit-print-commands.py
+++ b/piglit-print-commands.py
@@ -22,6 +22,7 @@
# DEALINGS IN THE SOFTWARE.
+from __future__ import print_function
import argparse
import sys
import os
@@ -77,7 +78,7 @@ def main():
profile.prepare_test_list(env)
for name, test in profile.test_list.items():
assert(isinstance(test, ExecTest))
- print name, ':::', getCommand(test)
+ print(name, ':::', getCommand(test))
if __name__ == "__main__":