mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-12 05:02:32 +01:00
Add self as an argument to methos in src/dbi.py
This commit is contained in:
parent
1fe4cef61b
commit
14609b3bb2
@ -114,7 +114,7 @@ class DirMapping(MappingInterface):
|
|||||||
def _makeFilename(self, id):
|
def _makeFilename(self, id):
|
||||||
return os.path.join(self.dirname, str(id))
|
return os.path.join(self.dirname, str(id))
|
||||||
|
|
||||||
def get(id):
|
def get(self, id):
|
||||||
try:
|
try:
|
||||||
fd = file(self._makeFilename(id))
|
fd = file(self._makeFilename(id))
|
||||||
return fd.read()
|
return fd.read()
|
||||||
@ -123,7 +123,7 @@ class DirMapping(MappingInterface):
|
|||||||
exn.realException = e
|
exn.realException = e
|
||||||
raise exn
|
raise exn
|
||||||
|
|
||||||
def set(id, s):
|
def set(self, id, s):
|
||||||
fd = file(self._makeFilename(id), 'w')
|
fd = file(self._makeFilename(id), 'w')
|
||||||
fd.write(s)
|
fd.write(s)
|
||||||
fd.close()
|
fd.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user