From 1146feac0cd1e558aa53255f3097cb8b31f5a617 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Wed, 10 Feb 2010 15:15:39 +0000
Subject: [PATCH] guess_extension can return None, make sure we do not include
 'None' in the filename in that case

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32416 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5OOo/OOoTemplate.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/product/ERP5OOo/OOoTemplate.py b/product/ERP5OOo/OOoTemplate.py
index 65437a9420..e00fab3055 100644
--- a/product/ERP5OOo/OOoTemplate.py
+++ b/product/ERP5OOo/OOoTemplate.py
@@ -568,7 +568,7 @@ class OOoTemplate(ZopePageTemplate):
           '%s; charset=utf-8' % self.content_type)
       request.RESPONSE.setHeader('Content-disposition',
           'inline;filename="%s%s"' % (self._getFileName(),
-                                      guess_extension(self.content_type)))
+                                      guess_extension(self.content_type) or ''))
     
     if DevelopmentMode:
       # Validate XML in development mode
-- 
2.30.9