Skip to content

Commit

Permalink
implented suggested code consolidation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Fulton committed Nov 18, 2016
1 parent 39d088e commit 930d15d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/ZODB/Connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1324,13 +1324,8 @@ def _extension(self, v):

def data(self, ob):
try:
data = self._data
except AttributeError:
raise KeyError(ob)

try:
return data[id(ob)]
except KeyError:
return self._data[id(ob)]
except (AttributeError, KeyError):
raise KeyError(ob)

def set_data(self, ob, ob_data):
Expand Down

0 comments on commit 930d15d

Please sign in to comment.