summaryrefslogtreecommitdiff
path: root/piglit-summary-html.py
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2016-03-30 11:18:39 -0700
committerDylan Baker <dylan@pnwbakers.com>2016-05-02 17:54:04 -0700
commit5fece51da7eef4893ae6c2fd6d642c41a4ed4e59 (patch)
tree0f02e72383dbb41fe431641962f4b2a038aabe4b /piglit-summary-html.py
parentb1ac7983ed1000c9029be724ec0be59c8661073e (diff)
framework: update the rest of the piglit-* commands to be py3
Convert the rest of the commands using six to make them both python 2 and python 3 safe. This also changes the default chbang to python instead of python2, which should only be a change on Arch linux. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Diffstat (limited to 'piglit-summary-html.py')
-rwxr-xr-xpiglit-summary-html.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/piglit-summary-html.py b/piglit-summary-html.py
index cb4e78cfc..81a7d24ee 100755
--- a/piglit-summary-html.py
+++ b/piglit-summary-html.py
@@ -1,6 +1,6 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
-# Copyright (c) 2014 Intel Corporation
+# Copyright (c) 2014, 2016 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -27,6 +27,11 @@ from __future__ import (
)
import sys
+import six
+
from framework.programs.summary import html
-html([i.decode('utf-8') for i in sys.argv[1:]])
+if six.PY2:
+ html([i.decode('utf-8') for i in sys.argv[1:]])
+elif six.PY3:
+ html(sys.argv[1:])