mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00

* Taskd and Taskw classes for testing are now available * Testing of server and client can now be performed. * The newer test wrappers will eventually replace the BaseTest class
20 lines
533 B
Python
20 lines
533 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
|
|
class CommandError(Exception):
|
|
def __init__(self, cmd, code, out, err, msg=None):
|
|
if msg is None:
|
|
self.msg = ("Command '{0}' finished with unexpected exit code "
|
|
"'{1}':\nStdout: '{2}'\nStderr: '{3}'")
|
|
else:
|
|
self.msg = msg
|
|
|
|
self.cmd = cmd
|
|
self.out = out
|
|
self.err = err
|
|
self.code = code
|
|
|
|
def __str__(self):
|
|
return self.msg.format(self.cmd, self.code, self.out, self.err)
|
|
|
|
# vim: ai sts=4 et sw=4
|