summaryrefslogtreecommitdiff
path: root/dealconvert/formats/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'dealconvert/formats/__init__.py')
-rw-r--r--dealconvert/formats/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/dealconvert/formats/__init__.py b/dealconvert/formats/__init__.py
index eea9fc6..9c37cf9 100644
--- a/dealconvert/formats/__init__.py
+++ b/dealconvert/formats/__init__.py
@@ -8,6 +8,8 @@ class DealFormat(object):
return self.parse_content(content)
def output(self, output_file, deal):
+ if not len(deal):
+ raise RuntimeError('Dealset is empty')
with open(output_file, 'wb') as out_file:
return self.output_content(out_file, deal)