aboutsummaryrefslogtreecommitdiff
path: root/behaviors/VerticalBar.py
blob: 66c8e56a1180acec5c7213d116aa95fbedbae1e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from operationscore.Behavior import *
class VerticalBar(Behavior):

    def processResponse(self, inputs, recurs):
        ret = []
        inputs = list(inputs)
        for inputset in inputs:
            #import pdb; pdb.set_trace()
            inputset = dict(inputset) 
            if 'xLoc' not in inputset:
                inputset['xLoc'] = inputset['Location'][0]
            xLoc = inputset['xLoc']

            condition = '{x} == ' + str(xLoc)
            
            if self['Combine']:
                inputset['Location'] += ',' + condition
            else:
                inputset['Location'] = condition 

            ret.append(inputset)
        return (ret, [])