summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/dbrecio.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/bsddb/dbrecio.py')
-rw-r--r--Lib/bsddb/dbrecio.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/bsddb/dbrecio.py b/Lib/bsddb/dbrecio.py
index 22e382a..d439f32 100644
--- a/Lib/bsddb/dbrecio.py
+++ b/Lib/bsddb/dbrecio.py
@@ -75,7 +75,7 @@ class DBRecIO:
dlen = newpos - self.pos
- r = self.db.get(key, txn=self.txn, dlen=dlen, doff=self.pos)
+ r = self.db.get(self.key, txn=self.txn, dlen=dlen, doff=self.pos)
self.pos = newpos
return r
@@ -121,7 +121,7 @@ class DBRecIO:
"Negative size not allowed")
elif size < self.pos:
self.pos = size
- self.db.put(key, "", txn=self.txn, dlen=self.len-size, doff=size)
+ self.db.put(self.key, "", txn=self.txn, dlen=self.len-size, doff=size)
def write(self, s):
if self.closed:
@@ -131,7 +131,7 @@ class DBRecIO:
self.buflist.append('\0'*(self.pos - self.len))
self.len = self.pos
newpos = self.pos + len(s)
- self.db.put(key, s, txn=self.txn, dlen=len(s), doff=self.pos)
+ self.db.put(self.key, s, txn=self.txn, dlen=len(s), doff=self.pos)
self.pos = newpos
def writelines(self, list):