From 13d9ba4b5f833dd96b63670b86948d6ec4561c82 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Wed, 9 Dec 2009 13:31:52 +0000
Subject: [PATCH] cleanups

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31190 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_deferred_style_core/Base_renderReportSection.xml | 2 +-
 .../portal_skins/erp5_deferred_style_core/Base_report.xml | 8 ++++----
 bt5/erp5_deferred_style/bt/revision                       | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_renderReportSection.xml b/bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_renderReportSection.xml
index 2d60d71e18..9f4586f3e4 100644
--- a/bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_renderReportSection.xml
+++ b/bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_renderReportSection.xml
@@ -76,7 +76,7 @@ if report_section.getFormId():\n
   form = getattr(context, report_section.getFormId())\n
 else:\n
   form = None\n
-#context.log(request.text())\n
+\n
 selection_name = request.get(\'prefixed_selection_name\')\n
 data = context.render_report_section.pt_render(\n
               extra_context=dict(form=form,\n
diff --git a/bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_report.xml b/bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_report.xml
index bf0baf5c43..6eba421aca 100644
--- a/bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_report.xml
+++ b/bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_report.xml
@@ -78,15 +78,15 @@ report_data = context.restrictedTraverse(form_path).report_view.pt_render(\n
                          report_method=dummyReportMethod,\n
                          form=portal.restrictedTraverse(form_path)))\n
 \n
-attachment_name = [x[len(\'filename=\'):] for x in request.RESPONSE.getHeader(\n
-               \'content-disposition\').split(\';\')\n
-               if x.startswith(\'filename=\')][0]\n
+attachment_name = [x[len(\'filename=\'):] for x in (request.RESPONSE.getHeader(\n
+                        \'content-disposition\') or \'\').split(\';\')\n
+                      if x.startswith(\'filename=\')][0]\n
 if attachment_name.startswith(\'"\'):\n
   attachment_name = attachment_name[1:]\n
 if attachment_name.endswith(\'"\'):\n
   attachment_name = attachment_name[:-1]\n
 attachment_list = (\n
-  {\'mime_type\': request.RESPONSE.getHeader(\'content-type\').split(\';\')[0],\n
+  {\'mime_type\': (request.RESPONSE.getHeader(\'content-type\') or \'application/octet-stream;\').split(\';\')[0],\n
    \'content\': \'%s\' % report_data,\n
    \'name\': attachment_name},)\n
 \n
diff --git a/bt5/erp5_deferred_style/bt/revision b/bt5/erp5_deferred_style/bt/revision
index 0aeb548544..a76c74dcec 100644
--- a/bt5/erp5_deferred_style/bt/revision
+++ b/bt5/erp5_deferred_style/bt/revision
@@ -1 +1 @@
-74
\ No newline at end of file
+75
\ No newline at end of file
-- 
2.30.9