[Zodb-checkins] SVN: ZODB/branches/ctheune-blobsupport/src/ZODB/Blobs/BlobStorage.py Add a comment about copying and deleting files instead of renaming.

Chris McDonough chrism at plope.com
Thu Mar 24 17:10:27 EST 2005


Log message for revision 29669:
  Add a comment about copying and deleting files instead of renaming.
  

Changed:
  U   ZODB/branches/ctheune-blobsupport/src/ZODB/Blobs/BlobStorage.py

-=-
Modified: ZODB/branches/ctheune-blobsupport/src/ZODB/Blobs/BlobStorage.py
===================================================================
--- ZODB/branches/ctheune-blobsupport/src/ZODB/Blobs/BlobStorage.py	2005-03-24 20:56:00 UTC (rev 29668)
+++ ZODB/branches/ctheune-blobsupport/src/ZODB/Blobs/BlobStorage.py	2005-03-24 22:10:26 UTC (rev 29669)
@@ -58,6 +58,10 @@
             try:
                 os.rename(blobfilename, targetname)
             except OSError:
+                # XXX CM: I don't think this is a good idea; maybe just fail
+                # here instead of doing a brute force copy?  This is awfully
+                # expensive and people won't know it's happening without
+                # at least a warning.
                 target = file(targetname, "wb")
                 source = file(blobfilename, "rb")
                 utils.cp(blobfile, target)



More information about the Zodb-checkins mailing list