|
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.22 2002-01-14 02:20:15 richard Exp $ |
| 18 | +#$Id: back_anydbm.py,v 1.23 2002-01-18 04:32:04 richard 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 |
@@ -398,14 +398,24 @@ def rollback(self): |
398 | 398 | for method, args in self.transactions: |
399 | 399 | # delete temporary files |
400 | 400 | if method == self._doStoreFile: |
401 | | - os.remove(args[0]+".tmp") |
| 401 | + if os.path.exists(args[0]+".tmp"): |
| 402 | + os.remove(args[0]+".tmp") |
402 | 403 | self.cache = {} |
403 | 404 | self.dirtynodes = {} |
404 | 405 | self.newnodes = {} |
405 | 406 | self.transactions = [] |
406 | 407 |
|
407 | 408 | # |
408 | 409 | #$Log: not supported by cvs2svn $ |
| 410 | +#Revision 1.22 2002/01/14 02:20:15 richard |
| 411 | +# . changed all config accesses so they access either the instance or the |
| 412 | +# config attriubute on the db. This means that all config is obtained from |
| 413 | +# instance_config instead of the mish-mash of classes. This will make |
| 414 | +# switching to a ConfigParser setup easier too, I hope. |
| 415 | +# |
| 416 | +#At a minimum, this makes migration a _little_ easier (a lot easier in the |
| 417 | +#0.5.0 switch, I hope!) |
| 418 | +# |
409 | 419 | #Revision 1.21 2002/01/02 02:31:38 richard |
410 | 420 | #Sorry for the huge checkin message - I was only intending to implement #496356 |
411 | 421 | #but I found a number of places where things had been broken by transactions: |
|
0 commit comments