Completed
Pull Request — master (#358)
by
unknown
02:09
created

SetAwayAction.run()   A

Complexity

Conditions 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 2
dl 0
loc 8
rs 9.4286
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