Commit a937e3aa authored by Vincent Pelletier's avatar Vincent Pelletier

Simplify overflow handling.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1759 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 9ec55c99
...@@ -236,11 +236,7 @@ class Connection(BaseConnection): ...@@ -236,11 +236,7 @@ class Connection(BaseConnection):
def _getNextId(self): def _getNextId(self):
next_id = self.cur_id next_id = self.cur_id
# Deal with an overflow. self.cur_id = (next_id + 1) & 0xffffffff
if self.cur_id == 0xffffffff:
self.cur_id = 0
else:
self.cur_id += 1
return next_id return next_id
def close(self): def close(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment