Mercurial > p > roundup > code
comparison roundup/hyperdb.py @ 2906:a8808157f892
fix some bugs introduced in refactoring of blobfiles filename()
unless in debug mode, keep a single persistent connection through a
single web or mailgw request
fix enabling of DEBUG logging in db_test_case (no cmdline switch yet)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 12 Nov 2004 04:07:05 +0000 |
| parents | 37e2b70105f7 |
| children | 2fc6c508b537 |
comparison
equal
deleted
inserted
replaced
| 2905:6e46572a9f39 | 2906:a8808157f892 |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: hyperdb.py,v 1.104 2004-10-08 05:44:33 richard Exp $ | 18 # $Id: hyperdb.py,v 1.105 2004-11-12 04:07:03 richard Exp $ |
| 19 | 19 |
| 20 """Hyperdatabase implementation, especially field types. | 20 """Hyperdatabase implementation, especially field types. |
| 21 """ | 21 """ |
| 22 __docformat__ = 'restructuredtext' | 22 __docformat__ = 'restructuredtext' |
| 23 | 23 |
| 751 shutil.copyfile(source, dest) | 751 shutil.copyfile(source, dest) |
| 752 | 752 |
| 753 def import_files(self, dirname, nodeid): | 753 def import_files(self, dirname, nodeid): |
| 754 ''' Import the "content" property as a file | 754 ''' Import the "content" property as a file |
| 755 ''' | 755 ''' |
| 756 dest = self.db.filename(self.classname, nodeid) | 756 dest = self.db.filename(self.classname, nodeid, create=True) |
| 757 x, filename = os.path.split(dest) | 757 x, filename = os.path.split(dest) |
| 758 x, subdir = os.path.split(x) | 758 x, subdir = os.path.split(x) |
| 759 source = os.path.join(dirname, self.classname+'-files', subdir, | 759 source = os.path.join(dirname, self.classname+'-files', subdir, |
| 760 filename) | 760 filename) |
| 761 if not os.path.exists(os.path.dirname(dest)): | 761 if not os.path.exists(os.path.dirname(dest)): |
