The following commit has been merged in the master branch: commit 62b4b5d8b2d72459d39faf2a7c535e06ba4b8f6f Author: Ole Streicher <oleb...@debian.org> Date: Mon Jan 11 13:19:23 2016 +0100
Fix some formatting errors diff --git a/webtools_py3/tasks_udd.py b/webtools_py3/tasks_udd.py index 85f3f90..3b65707 100755 --- a/webtools_py3/tasks_udd.py +++ b/webtools_py3/tasks_udd.py @@ -176,9 +176,9 @@ for lang in languages: outputfile = os.path.join(outputdir, 'index.{0}.html'.format(lang)) with open(outputfile, 'w') as f: try: - f.write(template.generate(**data).render('xhtml')) + f.write(template.generate(**data).render('xhtml')) except UnicodeDecodeError as err: - stderr.write("Some critical encoding problem occured when trying" + stderr.write("Some critical encoding problem occured when trying" + " to render index for lang {0}.\n{1}\n" .format(lang, str(err))) SetFilePermissions(outputfile) @@ -235,12 +235,12 @@ for lang in languages: data['othertasks'] = ("Links to other tasks") data['indexlink'] = ("Index of all tasks") - outputfile = os.path.join(outputdir, '{0}.{1}.html'.format(task, lang)) - if data['projectname'] == 'Debian Astro': template = loader.load('packages.xhtml') else: template = loader.load('tasks.xhtml') + + outputfile = os.path.join(outputdir, '{0}.{1}.html'.format(task, lang)) with open(outputfile, "w") as f: try: # We had to mask ampersand ('&') from Genshi but even if the browser shows @@ -252,7 +252,7 @@ for lang in languages: except UnicodeDecodeError as err: stderr.write("Some critical encoding problem occured when trying" + " to render task {0} for lang {1}.\n{2}\n" - .format(task, lang, str(err)) + .format(task, lang, str(err))) except UndefinedError as err: stderr.write("UndefinedError while rendering" + " task {0} for lang {1}.\n{2}\n" @@ -265,15 +265,14 @@ for lang in languages: for task in data['taskskeys']: data['projectsintasks'] = tasks.tasks[task].dependencies - outputfile = os.path.join(outputdir, - 'packagelist.{0}.html'.format(lang)) + outputfile = os.path.join(outputdir, 'packagelist.{0}.html'.format(lang)) with open(outputfile, 'w') as f: try: f.write(template.generate(**data).render('xhtml')) except UnicodeDecodeError as err: stderr.write("Some critical encoding problem occured when trying" + " to render long package list for lang {0}.\n{1}\n" - .format((lang, str(err))) + .format((lang, str(err)))) except UndefinedError as err: stderr.write("UndefinedError while trying to render" + " long package list for lang {0}.\n{1}\n" -- Static and dynamic websites for Debian Pure Blends _______________________________________________ Blends-commit mailing list Blends-commit@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/blends-commit