Completed
Pull Request — master (#360)
by
unknown
02:42
created

SetAwayAction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %
Metric Value
dl 0
loc 9
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 8 2
1
from lib import actions
2
3
4
class SetAwayAction(actions.BaseAction):
5
    def run(self, structure=None):
6
        if structure:
7
            s = self._get_structure(structure)
8
        else:
9
            s = self._get_default_structure()
10
11
        s.away = True
12
        return s.away
13