Add script invocation to ScriptQuestion
[quizzer.git] / quizzer / error.py
1 class CommandError (RuntimeError):
2     def __init__(self, arguments, stdin=None, stdout=None, stderr=None,
3                  status=None, msg=None):
4         error_msg = 'error executing {}'.format(arguments)
5         if msg:
6             error_msg = '{}: {}'.format(error_msg, msg)
7         super(CommandError, self).__init__(error_msg)
8         self.arguments = arguments
9         self.stdin = stdin
10         self.stdout = stdout
11         self.stderr = stderr
12         self.status = status