- 4F6467D323B0E8CFE531DDEED0B604438BBC15B6FFB050F0DA9BA0509174C6BB42D633C94F1CD46ACBA1FA7B7D2B74B8C5BDD896080C663B8F9C8BF893A174D6+ 5E6216FB339F461E197C6C2F878148CBF2032CE6C433F83DF2C29E88B31C467F9C8B689E14D5B0471A6275E7A40E286AC9DBEA69C60D3A16171E4BAE6B091339blatta/lib/state.py(40 . 14)(40 . 15)
196 results = self.cursor.execute("select handle_id,address,port,updated_at from at\
197 order by updated_at desc").fetchall()
198 else:
199 handle_id = self.cursor.execute("select handle_id from handles where handle=?",
200 (handle,)).fetchone()[0]
201 if None != handle_id:
202 results = self.cursor.execute("select handle_id,address,port,updated_at from at \
203 where handle_id=? order by updated_at desc",
204 (handle_id,)).fetchall()
205 result = self.cursor.execute("select handle_id from handles where handle=?",
206 (handle,)).fetchone()
207 if None != result:
208 handle_id = result[0]
209 else:
210 return []
211 results = self.cursor.execute("select handle_id,address,port,updated_at from at \
212 where handle_id=? order by updated_at desc",
213 (handle_id,)).fetchall()
214 for result in results:
215 handle_id, address, port, updated_at = result
216 h = self.cursor.execute("select handle from handles where handle_id=?",
(130 . 10)(131 . 11)
218 def remove_peer(self, handle):
219 # get peer id
220
221 peer_id = self.cursor.execute("select peer_id from handles where handle=?", (handle,)).fetchone()[0]
222 if peer_id == None:
223 return
224 result = self.cursor.execute("select peer_id from handles where handle=?", (handle,)).fetchone()
225 if result == None:
226 return
227 else:
228 peer_id = result[0]
229 # get all aliases
230
231 handle_ids = self.get_handle_ids_for_peer(peer_id)
(174 . 7)(176 . 7)
233
234 for handle in handles:
235 peer = self.get_peer_by_handle(handle[0])
236 if not self.is_duplicate(peers, peer):
237 if not (self.is_duplicate(peers, peer)):
238 peers.append(peer)
239 return peers
240