diff options
| author | Harry (OpenERP) <hmo@tinyerp.com> | 2010-07-20 18:35:13 +0530 |
|---|---|---|
| committer | Harry (OpenERP) <hmo@tinyerp.com> | 2010-07-20 18:35:13 +0530 |
| commit | 77f62a88a314a905e5ffc73cffd72d68ddfe33db (patch) | |
| tree | edc70351000fba9ea5a4ab27a3f680c5844e9e82 /addons/document/content_index.py | |
| parent | 90234707dc901a81935570274c52a5327940b66e (diff) | |
| parent | 1eea693ecadd3829fa729a727a154c23a1df6ab6 (diff) | |
[MERGE] merged new api of document module
bzr revid: hmo@tinyerp.com-20100720130513-3t2cbyvns3hlj6qn
Diffstat (limited to 'addons/document/content_index.py')
| -rw-r--r-- | addons/document/content_index.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/document/content_index.py b/addons/document/content_index.py index e7f88834647..d6012e60091 100644 --- a/addons/document/content_index.py +++ b/addons/document/content_index.py @@ -153,7 +153,10 @@ class contentIndex(object): if realfname : fname = realfname else: - bname,ext = os.path.splitext(filename) + try: + bname,ext = os.path.splitext(filename or 'test.tmp') + except Exception: + bname, ext = filename, 'tmp' fd, fname = tempfile.mkstemp(suffix=ext) os.write(fd, content) os.close(fd) |
