Completed
Push — master ( ff247a...b96a39 )
by Tomaz
23s
created

UnsilenceAction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 7
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 6 2
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