Mercurial > hg
comparison mercurial/keepalive.py @ 16686:67964cda8701
cleanup: "not x in y" -> "x not in y"
author | Brodie Rao <brodie@sf.io> |
---|---|
date | Sat, 12 May 2012 16:00:57 +0200 |
parents | 7de7630053cb |
children | e34106fa0dc3 |
comparison
equal
deleted
inserted
replaced
16685:43d55088415a | 16686:67964cda8701 |
---|---|
134 self._readymap = {} # map connection to ready state | 134 self._readymap = {} # map connection to ready state |
135 | 135 |
136 def add(self, host, connection, ready): | 136 def add(self, host, connection, ready): |
137 self._lock.acquire() | 137 self._lock.acquire() |
138 try: | 138 try: |
139 if not host in self._hostmap: | 139 if host not in self._hostmap: |
140 self._hostmap[host] = [] | 140 self._hostmap[host] = [] |
141 self._hostmap[host].append(connection) | 141 self._hostmap[host].append(connection) |
142 self._connmap[connection] = host | 142 self._connmap[connection] = host |
143 self._readymap[connection] = ready | 143 self._readymap[connection] = ready |
144 finally: | 144 finally: |