Mercurial > p > roundup > code
comparison roundup/hyperdb.py @ 2962:4607f58a007b
py2.1 compatibility
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 25 Nov 2004 22:51:06 +0000 |
| parents | 2fc6c508b537 |
| children | 293a17149765 ed97e2a85576 |
comparison
equal
deleted
inserted
replaced
| 2961:68ba01244341 | 2962:4607f58a007b |
|---|---|
| 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.106 2004-11-13 07:11:14 a1s Exp $ | 18 # $Id: hyperdb.py,v 1.107 2004-11-25 22:51:06 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 |
| 758 shutil.copyfile(source, dest) | 758 shutil.copyfile(source, dest) |
| 759 | 759 |
| 760 def import_files(self, dirname, nodeid): | 760 def import_files(self, dirname, nodeid): |
| 761 ''' Import the "content" property as a file | 761 ''' Import the "content" property as a file |
| 762 ''' | 762 ''' |
| 763 dest = self.db.filename(self.classname, nodeid, create=True) | 763 dest = self.db.filename(self.classname, nodeid, create=1) |
| 764 x, filename = os.path.split(dest) | 764 x, filename = os.path.split(dest) |
| 765 x, subdir = os.path.split(x) | 765 x, subdir = os.path.split(x) |
| 766 source = os.path.join(dirname, self.classname+'-files', subdir, | 766 source = os.path.join(dirname, self.classname+'-files', subdir, |
| 767 filename) | 767 filename) |
| 768 if not os.path.exists(os.path.dirname(dest)): | 768 if not os.path.exists(os.path.dirname(dest)): |
