Completed
Pull Request — master (#633)
by
unknown
02:19
created

UnsilenceAction.run()   A

Complexity

Conditions 2

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
1
from lib.sensu import SensuAction
2
3
__all__ = [
4
    'UnsilenceAction'
5
]
6
7
8
class UnsilenceAction(SensuAction):
9
    def run(self, check, client):
10
        path = 'silence/{}'.format(client)
11
        if check:
12
            path = "{}/{}".format(path, check)
13
14
        return self.api.delete_stash(path)
15