Package: qcumber / 1.0.14+dfsg-1

set_absolute_path_to_tex_template.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Author: Andreas Tille <TilleA@rki.de>
Last-Update: Wed, 16 Mar 2016 11:01:55 +0100
Description: Inside the Debian package we know exactly the location of the
 tex template - make sure it will be found reliably

--- a/QCumber.py
+++ b/QCumber.py
@@ -203,10 +203,11 @@ def writeReport(sample):
 	report_name = os.path.join(sample.mainResultsPath, "Report",
 		 "summary_" + sample.name + "_" + datetime.datetime.strftime(datetime.datetime.now(), "%d-%m-%y_%H-%M"))
 	print("Writing latex " ,report_name)
-	env = Environment()
-	env.loader = FileSystemLoader(os.path.dirname(__file__))
-
-	template = env.get_template("report.tex")
+	template_dir = '/usr/share/qcumber'
+	template_file = 'report.tex'
+	loader = FileSystemLoader(template_dir)
+	env = Environment(loader=loader)
+	template = env.get_template(template_file)
 	try:
 		trim_param= sample.readSets[0].trimRes.print_param(arguments["palindrome"], arguments["minlen"], arguments["trimOption"])
 	except: