summaryrefslogtreecommitdiff
path: root/src/meetingtools
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2011-10-13 14:49:08 +0200
committerLeif Johansson <leifj@sunet.se>2011-10-13 14:49:08 +0200
commit95e8875f5aeb5291a4bbd1b26c5a0522c491b0dd (patch)
tree63e2cb759f3cc255e5dd34982310a62a112ff431 /src/meetingtools
parent6ed2776f96f5f8efe51682b0fecb07587b7bb968 (diff)
better locking
Diffstat (limited to 'src/meetingtools')
-rw-r--r--src/meetingtools/apps/room/models.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/meetingtools/apps/room/models.py b/src/meetingtools/apps/room/models.py
index 38ae12c..731e8b9 100644
--- a/src/meetingtools/apps/room/models.py
+++ b/src/meetingtools/apps/room/models.py
@@ -61,8 +61,10 @@ class Room(models.Model):
def _lockf(self):
return "%s%sroom-%d.lock" % (LOCK_DIR,os.sep,+self.id)
- def lock(self):
- f = open(self._lockf())
+ def lock(self,msg=None):
+ f = open(self._lockf(),'w')
+ if msg:
+ f.write(msg)
f.close()
def unlock(self):