[v2,16/16] program/summary: use piglit exceptions

Submitted by Dylan Baker on May 18, 2015, 5:57 p.m.

Details

Message ID 1431971870-20138-17-git-send-email-baker.dylan.c@gmail.com
State New, archived
Headers show

Not browsing as part of any series.

Commit Message

Dylan Baker May 18, 2015, 5:57 p.m.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
---
 framework/programs/summary.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/framework/programs/summary.py b/framework/programs/summary.py
index 130d33a..fef5680 100644
--- a/framework/programs/summary.py
+++ b/framework/programs/summary.py
@@ -205,9 +205,8 @@  def aggregate(input_):
         backends.json._write(results, outfile)
     except IOError as e:
         if e.errno == errno.EPERM:
-            print("Error: Unable to write aggregated file, permission denied.",
-                  file=sys.stderr)
-            sys.exit(1)
+            raise exceptions.PiglitFatalError(
+                "Unable to write aggregated file, permission denied.")
         raise
 
     print("Aggregated file written to: {}".format(outfile))