Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | # Enable other layers to have modules in the same named directory |
| 2 | from pkgutil import extend_path |
| 3 | __path__ = extend_path(__path__, __name__) |
| 4 | |
| 5 | |
| 6 | # Borrowed from CalledProcessError |
| 7 | |
| 8 | class CommandError(Exception): |
| 9 | def __init__(self, retcode, cmd, output = None): |
| 10 | self.retcode = retcode |
| 11 | self.cmd = cmd |
| 12 | self.output = output |
| 13 | def __str__(self): |
| 14 | return "Command '%s' returned non-zero exit status %d with output: %s" % (self.cmd, self.retcode, self.output) |
| 15 | |