Revision 29e07078

View differences:

test_code/dummyrouting.py
87 87
            for event in eventList:
88 88
                sleep(event[0])
89 89
                event[2](**event[3])
90
                print " XX", time.time(), event[0], event[1]
91 90
                info(event[1] + str(time.time()) + "\n")
92 91
            sleep(waitTime)
93 92
            self.killAll(signal.SIGTERM)
......
134 133
        centList =  sorted(
135 134
                [n for n in nx.betweenness_centrality(self.graph).items() \
136 135
                        if n[1] > 0], key = lambda x: x[1])
137
        for idx, n in enumerate(centList[:]):
136
        connected_centlist = []
137
        for idx, n in enumerate(centList):
138 138
            gg = self.graph.copy()
139 139
            gg.remove_node(n[0])
140 140
            conSize = len(nx.connected_components(gg)[0])
141
            if conSize != len(self.graph) - 1:
142
                del centList[idx]
143
        return centList
141
            if conSize == len(self.graph) - 1:
142
                connected_centlist.append(n)
143
        return connected_centlist
144 144

  
145 145
    def startRun(self):
146 146

  
......
197 197
        for pid, h in self.pendingProc.items():
198 198
            if hostName:
199 199
                if hostName == h.name:
200
                    print "sending signal to host:", hostName, ", pid", pid
200 201
                    self.sendSig(pid, sig)
201 202
                    break
202 203
                continue

Also available in: Unified diff