prewikka/master: Whitespace police
[email protected] Mon, 6 Jul 2009 17:06:32 +0200 (CEST)
| Newsgroups | gmane.comp.security.ids.prelude.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit e6f265ad89840695f1f6b7dc15870f35608aefb1 Author: Yoann Vandoorselaere <[email protected]> Date: Fri Jul 3 12:50:26 2009 +0200 Whitespace police ======================================== prewikka/Filter.py | 6 +++--- prewikka/MyConfigParser.py | 12 ++++++------ prewikka/templates/ErrorTemplate.tmpl | 2 +- prewikka/templates/HTMLDocument.tmpl | 30 +++++++++++++++--------------- 4 files changed, 25 insertions(+), 25 deletions(-) ======================================== diff --git a/prewikka/Filter.py b/prewikka/Filter.py index 9dc71b1..15c90bc 100644 --- a/prewikka/Filter.py +++ b/prewikka/Filter.py @@ -37,9 +37,9 @@ class CriteriaIDMEF: i = 0 while True: name = prelude.idmef_class_get_child_name(root, i) - if name == None: + if name == None: break - + if criteria_root != None: criteria = "%s.%s" % (criteria_root, name) else: @@ -65,7 +65,7 @@ class Filter: crit = prelude.idmef_criteria_new_from_string(unicode(self).encode("utf8")) prelude.idmef_criteria_destroy(crit) - + def _replace(self, element): element = element.group(1) if element in ("and", "AND", "&&"): diff --git a/prewikka/MyConfigParser.py b/prewikka/MyConfigParser.py index bde4427..380e6e4 100644 --- a/prewikka/MyConfigParser.py +++ b/prewikka/MyConfigParser.py @@ -59,7 +59,7 @@ class OrderedDict(dict): def items(self): return map(lambda key: (key, self[key]), self.ordered_key_list) - + def copy(self): new = OrderedDict() for key in self.keys(): @@ -84,7 +84,7 @@ class ConfigParserSection(OrderedDict): return self[key].value except KeyError: return value - + def getOptions(self): return self.values() @@ -109,7 +109,7 @@ class MyConfigParser: - we need to keep the right order of options in sections (this is done via the OrderedDict class that subclass dict) """ - + EMPTY_LINE_REGEXP = re.compile("^\s*(\#.*)?$") SECTION_REGEXP = re.compile("^\s*\[(?P<name>.+)]") OPTION_REGEXP = re.compile("^\s*(?P<name>[\s]*[^:]+)(\:\s*(?P<value>.+))?$") @@ -122,7 +122,7 @@ class MyConfigParser: def load(self): lineno = 0 - + for line in open(self.filename).readlines(): lineno += 1 result = self.EMPTY_LINE_REGEXP.match(line) @@ -144,7 +144,7 @@ class MyConfigParser: self._current_section[name] = ConfigParserOption(name, value, lineno, line) else: raise ParseError(file.name, lineno, line) - + def getSection(self, name): return self._sections[name] @@ -158,5 +158,5 @@ class MyConfigParser: for option in section.getOptions(): content += "%s: %s\n" % (option.name, option.value) content += "\n" - + return content diff --git a/prewikka/templates/ErrorTemplate.tmpl b/prewikka/templates/ErrorTemplate.tmpl index 08ebb44..f93c3ca 100644 --- a/prewikka/templates/ErrorTemplate.tmpl +++ b/prewikka/templates/ErrorTemplate.tmpl @@ -5,7 +5,7 @@ #filter CleanOutput <div id="fieldset_page" style="position: absolute; top: 25%; left: 50%; width:600px; margin-left:-220px;"> - <fieldset style="text-align: center; vertical-align: middle;"> + <fieldset style="text-align: center; vertical-align: middle;"> <legend class="error_name">$name</legend> <p><b>$message</b></p> #if $traceback diff --git a/prewikka/templates/HTMLDocument.tmpl b/prewikka/templates/HTMLDocument.tmpl index 2a3cecf..d13a3f2 100644 --- a/prewikka/templates/HTMLDocument.tmpl +++ b/prewikka/templates/HTMLDocument.tmpl @@ -1,22 +1,22 @@ <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <title>$document.title</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <link rel="Shortcut Icon" href="prewikka/images/favicon.ico"/> + <head> + <title>$document.title</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <link rel="Shortcut Icon" href="prewikka/images/favicon.ico"/> - #for $css_file in $document.css_files - <link rel="stylesheet" href="$css_file" type="text/css"/> - #end for + #for $css_file in $document.css_files + <link rel="stylesheet" href="$css_file" type="text/css"/> + #end for - #for $js_file in $document.js_files - <script src="$js_file" type="text/javascript"></script> - #end for + #for $js_file in $document.js_files + <script src="$js_file" type="text/javascript"></script> + #end for - #def head_extra_content - #end def - $head_extra_content - </head> - $body + #def head_extra_content + #end def + $head_extra_content + </head> + $body </html> _______________________________________________ Prelude-cvslog site list [email protected] http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog