|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
18 | | -#$Id: back_anydbm.py,v 1.32 2002-04-15 23:25:15 richard Exp $ |
| 18 | +#$Id: back_anydbm.py,v 1.33 2002-04-24 10:38:26 rochecompaan Exp $ |
19 | 19 | ''' |
20 | 20 | This module defines a backend that saves the hyperdatabase in a database |
21 | 21 | chosen by anydbm. It is guaranteed to always be available in python |
@@ -61,6 +61,8 @@ def __init__(self, config, journaltag=None): |
61 | 61 | self.dirtynodes = {} # keep track of the dirty nodes by class |
62 | 62 | self.newnodes = {} # keep track of the new nodes by class |
63 | 63 | self.transactions = [] |
| 64 | + # ensure files are group readable and writable |
| 65 | + os.umask(0002) |
64 | 66 |
|
65 | 67 | def __repr__(self): |
66 | 68 | return '<back_anydbm instance at %x>'%id(self) |
@@ -469,6 +471,12 @@ def rollback(self): |
469 | 471 |
|
470 | 472 | # |
471 | 473 | #$Log: not supported by cvs2svn $ |
| 474 | +#Revision 1.32 2002/04/15 23:25:15 richard |
| 475 | +#. node ids are now generated from a lockable store - no more race conditions |
| 476 | +# |
| 477 | +#We're using the portalocker code by Jonathan Feinberg that was contributed |
| 478 | +#to the ASPN Python cookbook. This gives us locking across Unix and Windows. |
| 479 | +# |
472 | 480 | #Revision 1.31 2002/04/03 05:54:31 richard |
473 | 481 | #Fixed serialisation problem by moving the serialisation step out of the |
474 | 482 | #hyperdb.Class (get, set) into the hyperdb.Database. |
|
0 commit comments