Add self as an argument to methos in src/dbi.py

This commit is contained in:
Valentin Lorentz 2012-05-02 20:50:06 +02:00 committed by James McCoy
parent 1fe4cef61b
commit 14609b3bb2

View File

@ -114,7 +114,7 @@ class DirMapping(MappingInterface):
def _makeFilename(self, id):
return os.path.join(self.dirname, str(id))
def get(id):
def get(self, id):
try:
fd = file(self._makeFilename(id))
return fd.read()
@ -123,7 +123,7 @@ class DirMapping(MappingInterface):
exn.realException = e
raise exn
def set(id, s):
def set(self, id, s):
fd = file(self._makeFilename(id), 'w')
fd.write(s)
fd.close()