aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/command/html.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2024-03-30 22:16:37 +0100
committerMatěj Cepl <mcepl@cepl.eu>2024-03-30 22:16:37 +0100
commit6669d427f87ec62a86a680a542d2f87f2d65cc80 (patch)
tree80e08e1830eb6283fffa2d3db600ad00090d1970 /libbe/command/html.py
parentbc53c496220b283773f65762d4283c8f1e480131 (diff)
downloadbugseverywhere-6669d427f87ec62a86a680a542d2f87f2d65cc80.tar.gz
Used PyCharms inspectors.
Diffstat (limited to 'libbe/command/html.py')
-rw-r--r--libbe/command/html.py22
1 files changed, 6 insertions, 16 deletions
diff --git a/libbe/command/html.py b/libbe/command/html.py
index ed43808..5ec8691 100644
--- a/libbe/command/html.py
+++ b/libbe/command/html.py
@@ -100,21 +100,11 @@ class ServerApp (libbe.util.wsgi.WSGI_AppObject,
self.logger.log(
self.log_level, 'generate {} index file for {} bugs'.format(
bug_type, len(bugs)))
- template_info = {
- 'title': self.title,
- 'charset': 'UTF-8',
- 'stylesheet': 'style.css',
- 'header': self.header,
- 'active_class': 'tab nsel',
- 'inactive_class': 'tab nsel',
- 'target_class': 'tab nsel',
- 'bugs': bugs,
- 'bug_entry': self.template.get_template('index_bug_entry.html'),
- 'bug_dir': self.bug_dir,
- 'index_file': self._index_file,
- 'generation_time': self._generation_time(),
- }
- template_info['{}_class'.format(bug_type)] = 'tab sel'
+ template_info = {'title': self.title, 'charset': 'UTF-8', 'stylesheet': 'style.css', 'header': self.header,
+ 'active_class': 'tab nsel', 'inactive_class': 'tab nsel', 'target_class': 'tab nsel',
+ 'bugs': bugs, 'bug_entry': self.template.get_template('index_bug_entry.html'),
+ 'bug_dir': self.bug_dir, 'index_file': self._index_file,
+ 'generation_time': self._generation_time(), '{}_class'.format(bug_type): 'tab sel'}
if bug_type == 'target':
template = self.template.get_template('target_index.html')
template_info['targets'] = [
@@ -314,7 +304,7 @@ class ServerApp (libbe.util.wsgi.WSGI_AppObject,
return time.ctime()
def _escape(self, string):
- if string == None:
+ if string is None:
return ''
return xml.sax.saxutils.escape(string)