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

ShellError   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 10
c 2
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 4 1
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