Permalink
Browse files

Clean up: Trims trailing spaces.

git-svn-id: svn://cherokee-project.com/cherokee/trunk@3993 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
alobbs committed Dec 13, 2009
1 parent 4b21ec6 commit 72f64441347fbfff94243d866fe4b2e4dc9fa75d
Showing 408 changed files with 3,214 additions and 3,214 deletions.
View
@@ -9,7 +9,7 @@ def graphs_are_active (cfg):
def graphs_get_images (cfg, filter):
rrd_dir = cfg.get_val("server!collector!database_dir", CHEROKEE_RRD_DIR)
img_dir = os.path.join (rrd_dir, "images")
-
+
files = []
if os.path.exists (img_dir):
for f in os.listdir(img_dir):
View
@@ -27,7 +27,7 @@
$("#log_vsrv_%(vserver)s").load("/monitor/content/%(vserver)s");
}
- window.setInterval (function(){
+ window.setInterval (function(){
log_%(vserver)s_reload();
}, 1000 );
@@ -41,7 +41,7 @@ def __init__ (self, filename):
# Create the thread
threading.Thread.__init__ (self)
self.setDaemon (1)
-
+
# File
self.file = None
self.filename = filename
@@ -59,7 +59,7 @@ def __open_file (self):
self.file = open (self.filename, 'r')
except IOError:
return True
-
+
# Seek
try:
filesize = os.path.getsize (self.filename)
@@ -147,7 +147,7 @@ def init_log_readers (cfg):
# Launch them
for reader in widget_objs:
reader.start()
-
+
class PageMonitor (PageMenu, FormHelper):
def __init__ (self, cfg=None):
@@ -174,7 +174,7 @@ def _op_handler (self, uri, post):
return render
else:
self._op_render()
-
+
def _op_render (self):
content = SINGLE_TIME_HTML
@@ -188,7 +188,7 @@ def _op_render (self):
'log_file': widget.filename,
'vserver': vsrv})
content += entry
-
+
self.AddMacroContent ('title', _('Cherokee Web Server Monitor'))
self.AddMacroContent ('content', content)
return Page.Render(self)
View
@@ -1,4 +1,4 @@
-import validations
+import validations
from Form import *
from Table import *
View
@@ -88,7 +88,7 @@ def _op_render (self):
if self._prefix.startswith('tmp!'):
return self._render_new_entry()
return self._render_modify_entry()
-
+
def _op_apply_changes (self, uri, post):
self.ApplyChangesPrefix (self._prefix, None, post)
View
@@ -37,7 +37,7 @@ def _op_render (self):
txt = '<h2>%s</h2>' % (_('Parsing'))
txt += self.Indent(table)
- # Copy errors to the modules,
+ # Copy errors to the modules,
# they may need to print them
self._copy_errors (self, self._file)
self._copy_errors (self, self._dirlist)
View
@@ -49,7 +49,7 @@ def _op_render (self):
txt += '<h2>%s</h2>' % (_('Data base balancing'))
table = TableProps()
prefix = "%s!balancer" % (self._prefix)
- e = self.AddPropOptions_Reload_Module (table, _("Balancer"), prefix,
+ e = self.AddPropOptions_Reload_Module (table, _("Balancer"), prefix,
modules_available(BALANCERS), _(NOTE_BALANCER))
txt += self.Indent(str(table) + e)
return txt
View
@@ -11,7 +11,7 @@ def __init__ (self, cfg, prefix, submit_url):
def _op_render (self):
return ""
-
+
def apply_cfg (self, values):
None
View
@@ -1,5 +1,5 @@
import os
-import validations
+import validations
from Form import *
from Table import *
@@ -32,7 +32,7 @@ class ModuleDirlist (ModuleHandler):
'user', 'group',
'theme', 'icon_dir',
'notice_files', 'symlinks',
- 'redir_symlinks', 'hidden',
+ 'redir_symlinks', 'hidden',
'backup'
]
View
@@ -15,7 +15,7 @@ def __init__ (self, cfg, prefix, submit_url):
def _op_render (self):
return ''
-
+
def _op_apply_changes (self, uri, post):
None
View
@@ -11,7 +11,7 @@ class ModuleErrorNn (Module, FormHelper):
def __init__ (self, cfg, prefix, submit_url):
FormHelper.__init__ (self, 'error_nn', cfg)
Module.__init__ (self, 'error_nn', cfg, prefix, submit_url)
-
+
def _op_render (self):
return ''
View
@@ -22,7 +22,7 @@ def __init__ (self, cfg, prefix, submit_url):
# Special case: there is a check in the rule
self.checks = ['%s!iocache'%(self._prefix),
- '%s!match_any'%(self._prefix),
+ '%s!match_any'%(self._prefix),
'%s!match_only_files'%(self._prefix),
'%s!match_index_files'%(self._prefix)]
View
@@ -44,7 +44,7 @@ def _op_render_modify (self):
link_del = ''
table += (ip, link_del)
n = max(int(k), n)
-
+
if n > -1:
txt += '<h2>IPs and SubNets</h2>'
txt += self.Indent(table)
View
@@ -24,7 +24,7 @@ def _op_render (self):
txt = ""
pre = '%s!fullpath'%(self._prefix)
-
+
table = Table (2)
first = True
for k in self._cfg.keys(pre):
View
@@ -37,7 +37,7 @@ def _op_render (self):
self.AddPropOptions_Reload_Plain (table, _('Header'), '%s!header'%(self._prefix), HEADERS, _(NOTE_HEADER))
self.AddPropEntry (table, _('Regular Expression'), '%s!match'%(self._prefix), _(NOTE_MATCH))
return str(table)
-
+
def apply_cfg (self, values):
if values.has_key('value'):
header = values['value']
View
@@ -48,7 +48,7 @@ def _op_render (self):
self.AddPropEntry (table, _("DB Password"), "%s!passwd"%(self._prefix), _(NOTE_PASSWD))
self.AddPropEntry (table, _("Database"), "%s!database"%(self._prefix), _(NOTE_DB))
self.AddPropEntry (table, _("SQL Query"), "%s!query"%(self._prefix), _(NOTE_SQL))
-
+
if not is_basic:
self.AddPropOptions (table, _('Password Hash'), "%s!hash"%(self._prefix), HASHES, _(NOTE_HASH), disabled=1)
else:
View
@@ -21,7 +21,7 @@
class ModuleProxy (ModuleHandler):
PROPERTIES = [
- 'balancer',
+ 'balancer',
'in_allow_keepalive',
'in_preserve_host',
'out_preserve_server',
@@ -70,7 +70,7 @@ def _render_request (self):
_("URL Rewriting"))
txt += self._render_generic_header_list ("in_header_add",
- "tmp!in_header_add",
+ "tmp!in_header_add",
_("Header Addition"),
_("Add New Header"))
@@ -85,7 +85,7 @@ def _render_reply (self):
_("URL Rewriting"))
txt += self._render_generic_header_list ("out_header_add",
- "tmp!out_header_add",
+ "tmp!out_header_add",
_("Header addition"),
_("Add New Header"))
@@ -209,6 +209,6 @@ def _op_apply_changes (self, uri, post):
props._op_apply_changes (uri, post)
# And CGI changes
- self.ApplyChangesPrefix (self._prefix,
+ self.ApplyChangesPrefix (self._prefix,
['in_allow_keepalive', 'in_preserve_host',
'out_preserve_server'], post)
View
@@ -33,7 +33,7 @@ def _op_render (self):
table = TableProps()
prefix = "%s!balancer" % (self._prefix)
- e = self.AddPropOptions_Reload_Module (table, _("Balancer"), prefix,
+ e = self.AddPropOptions_Reload_Module (table, _("Balancer"), prefix,
modules_available(BALANCERS), _(NOTE_BALANCER))
txt += self.Indent(str(table) + e)
return txt
@@ -41,7 +41,7 @@ def _op_render (self):
txt = '<h2>%s</h2>' % (_('Covering parameters'))
txt += self.Indent(table)
- # Copy errors to the modules,
+ # Copy errors to the modules,
# they may need to print them
self._copy_errors (self, self._file)
View
@@ -1,4 +1,4 @@
-import validations
+import validations
from Form import *
from Table import *
@@ -45,7 +45,7 @@ def _op_render (self):
txt += '<h2>%s</h2>' % (_('Audio/Video Streaming'))
txt += self.Indent(table)
- # Copy errors to the modules,
+ # Copy errors to the modules,
# they may need to print them
self._copy_errors (self, self._file)
View
@@ -33,7 +33,7 @@ def _op_render (self):
table = TableProps()
prefix = "%s!balancer" % (self._prefix)
- e = self.AddPropOptions_Reload_Module (table, _("Balancer"), prefix,
+ e = self.AddPropOptions_Reload_Module (table, _("Balancer"), prefix,
modules_available(BALANCERS), _(NOTE_BALANCER))
txt += self.Indent(str(table) + e)
return txt
View
@@ -143,8 +143,8 @@ def _render_tls (self):
return self.Indent(table)
def _op_apply_changes (self, uri, post):
- self.ApplyChanges (['server!keepalive',
- 'server!chunked_encoding',
- 'server!iocache'],
+ self.ApplyChanges (['server!keepalive',
+ 'server!chunked_encoding',
+ 'server!iocache'],
post, validation = DATA_VALIDATION)
View
@@ -30,7 +30,7 @@
("vserver!(\d+)!rule!(\d+)!allow_from", validations.is_ip_or_netmask_list),
("vserver!(\d+)!rule!(\d+)!rate", validations.is_number_gt_0),
("vserver!(\d+)!rule!(\d+)!timeout", validations.is_number_gt_0),
- ("vserver!(\d+)!rule!(\d+)!expiration!time", validations.is_time)
+ ("vserver!(\d+)!rule!(\d+)!expiration!time", validations.is_time)
]
HELPS = [
View
@@ -80,8 +80,8 @@ def _get_options_icons (self, cfg_key, file_filter=None, selected=None):
# Build the options
if selected:
- options = EntryOptions (cfg_key, file_options,
- onChange='return option_icons_update(\'%s\');'%(cfg_key),
+ options = EntryOptions (cfg_key, file_options,
+ onChange='return option_icons_update(\'%s\');'%(cfg_key),
selected=selected)
else:
options = EntryOptions (cfg_key, file_options,
View
@@ -248,7 +248,7 @@ def sort_vservers(x,y):
}
});
- function openSection(section)
+ function openSection(section)
{
document.cookie = "open_vssec=" + section;
if (prevSection != '') {
@@ -309,7 +309,7 @@ def sort_vservers(x,y):
txt += '<div class="rulesbutton"><a id="clonesection_b">%s</a></div>' % (_('Clone Virtual Server'))
txt += '<div class="rulesbutton"><a id="wizardsection_b">%s</a></div>' % (_('Wizards'))
txt += '</div>'
-
+
return txt
def _render_wizards (self):
@@ -320,7 +320,7 @@ def _render_wizards (self):
table = '<table id="wizSel" class="rulestable"><tr><th>Category</th><th>Wizard</th></tr>'
table += '<tr><td id="wizG"></td><td id="wizL"></td></table>'
- if txt:
+ if txt:
txt = _("<h2>Wizards</h2>") + table + txt
return txt
@@ -356,7 +356,7 @@ def _op_clone_vserver (self, post):
return
# Clone it
- error = self._cfg.clone('vserver!%s'%(prio_source),
+ error = self._cfg.clone('vserver!%s'%(prio_source),
'vserver!%s'%(prio_target))
if not error:
self._cfg['vserver!%s!nick'%(prio_target)] = nick_target
View
@@ -9,9 +9,9 @@ def __init__ (self, raw=''):
for key in tmp:
self._vars[key] = []
for n in range(len(tmp[key])):
- value = tmp[key][n]
+ value = tmp[key][n]
self._vars[key] += [unquote (value)]
-
+
def _smart_chooser (self, key):
if not key in self._vars:
return None
@@ -24,13 +24,13 @@ def _smart_chooser (self, key):
def get_val (self, key, not_found=None):
tmp = self._smart_chooser(key)
- if not tmp:
+ if not tmp:
return not_found
return tmp
def pop (self, key, not_found=None):
val = self._smart_chooser(key)
- if not val:
+ if not val:
return not_found
if key in self._vars:
del(self[key])
@@ -43,10 +43,10 @@ def __getitem__ (self, key):
def __setitem__ (self, key, val):
self._vars[key] = val
-
+
def __delitem__ (self, key):
del (self._vars[key])
-
+
def __len__ (self):
return len(self._vars)
View
@@ -7,7 +7,7 @@ def __init__ (self, cfg, prefix):
def _normalize (self):
if not self._cfg[self._cfg_pre]:
- return
+ return
# Build the new list
child = []
@@ -72,12 +72,12 @@ def change_prios (self, changes):
p_entry = int(entry)
if p_entry not in relocated.keys():
relocated[p_entry] = self[entry]
-
+
# Reassign childs
for p in self.keys():
del (self._cfg["%s!%s" % (self._cfg_pre, p)])
for item in relocated.keys():
pre = '%s!%d' % (self._cfg_pre, item)
self._cfg.set_sub_node (pre, relocated[item])
-
+
Oops, something went wrong.

0 comments on commit 72f6444

Please sign in to comment.