Raise exception in report_content is empty

This commit is contained in:
Cédric Krier committed 2008-05-19 10:57:32 +02:00
1 parent c0d5db44c1
commit 96d1e27149
1 file changed
+2
+2
View File
@@ -228,6 +228,8 @@ class Report(object):
browse(cursor, user, user)
localcontext['_language_cache'] = {}
localcontext.update(context)
if not report.report_content:
raise ExceptOSV('Error', 'Missing report file!')
content_io = StringIO.StringIO(report.report_content)
content_z = zipfile.ZipFile(content_io, mode='r')
content_xml = content_z.read('content.xml')