Completed
Push — develop ( 3dabc3...f1379d )
by Jace
03:04 queued 17s
created

ShellError.__init__()   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
dl 0
loc 4
ccs 4
cts 4
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
"""Shared exceptions."""
2
3
4 1
class InvalidConfig(ValueError):
5
    """Raised when the configuration file is invalid."""
6
7
8 1
class ShellError(RuntimeError):
9
    """Raised when a shell call has a non-zero return code."""
10
11 1
    def __init__(self, *args, **kwargs):
12 1
        self.program = kwargs.pop('program', None)
13 1
        self.output = kwargs.pop('output', None)
14 1
        super().__init__(*args, **kwargs)
15
16
17 1
class InvalidRepository(RuntimeError):
18
    """Raised when there is a problem with the checked out directory."""
19
20
21 1
class UncommittedChanges(RuntimeError):
22
    """Raised when uncommitted changes are not expected."""
23
24
25 1
class ScriptFailure(ShellError):
26
    """Raised when post-install script has a non-zero exit code."""
27