Mercurial > p > roundup > code
diff roundup/support.py @ 3019:293a17149765
First cut at exporting/importing file content from and to the hyperdb.
Unfortunately, I currently set the content using "Class.set", which also
updates the "activity". So testImportExport is broken for tsearch2 right now.
Also did bits of refactoring in hyperdb.FileClass, a tiny step towards making
in-database files backend & indexer-independent.
| author | Johannes Gijsbers <jlgijsbers@users.sourceforge.net> |
|---|---|
| date | Sat, 18 Dec 2004 11:12:04 +0000 |
| parents | 887d631ea2ba |
| children | a2ae11191968 |
line wrap: on
line diff
--- a/roundup/support.py Fri Dec 17 23:42:34 2004 +0000 +++ b/roundup/support.py Sat Dec 18 11:12:04 2004 +0000 @@ -4,6 +4,8 @@ __docformat__ = 'restructuredtext' +import os + class TruthDict: '''Returns True for valid keys, False for others. ''' @@ -18,4 +20,8 @@ def __getitem__(self, name): return self.keys.has_key(name) +def ensureParentsExist(dest): + if not os.path.exists(os.path.dirname(dest)): + os.makedirs(os.path.dirname(dest)) + # vim: set et sts=4 sw=4 :
