summaryrefslogtreecommitdiff
path: root/bin/report/render/render.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/report/render/render.py')
-rw-r--r--bin/report/render/render.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/bin/report/render/render.py b/bin/report/render/render.py
index 5252288d53d..0d00701ee54 100644
--- a/bin/report/render/render.py
+++ b/bin/report/render/render.py
@@ -36,9 +36,23 @@ import threading
# _render
#
class render(object):
- def __init__(self, bin_datas={}, path='.'):
+ """ Represents a report job being rendered.
+
+ @param bin_datas a dictionary of name:<binary content> of images etc.
+ @param path the path in which binary files can be discovered, useful
+ for components (images) of the report. It can be:
+ - a string, relative or absolute path to images
+ - a list, containing strings of paths.
+ If a string is absolute path, it will be opened as such, else
+ it will be passed to tools.file_open() which also considers zip
+ addons.
+ """
+ def __init__(self, bin_datas=None, path='.'):
self.done = False
- self.bin_datas = bin_datas
+ if bin_datas is None:
+ self.bin_datas = {}
+ else:
+ self.bin_datas = bin_datas
self.path = path
def _render(self):