def doIdle(conn): toDelete = [] for target, conf in getConfs().iteritems(): if conf.idle(conn): toDelete.append(target) for t in toDelete: del getConfs()[t]
def doIdle(conn): try: toDelete = [] for target, conf in getConfs().iteritems(): if conf.idle(conn): toDelete.append(target) cooldown.updateCooldowns() for t in toDelete: del getConfs()[t] except KeyboardInterrupt: return 0 return 1