summaryrefslogtreecommitdiff
path: root/paste/util
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-04-21 15:26:47 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-04-21 15:26:47 +0200
commit04ecd5542849191457ccfc3e42a39452db47825a (patch)
treeb0a470e46326b709d090a900847bbb004d355607 /paste/util
parent4c177fce89fee925f0f4fbfde00ce2e1252562c0 (diff)
downloadpaste-04ecd5542849191457ccfc3e42a39452db47825a.tar.gz
Strip trailing spaces
Diffstat (limited to 'paste/util')
-rw-r--r--paste/util/UserDict24.py2
-rw-r--r--paste/util/dateinterval.py4
-rw-r--r--paste/util/filemixin.py2
-rw-r--r--paste/util/finddata.py2
-rw-r--r--paste/util/findpackage.py2
-rw-r--r--paste/util/looper.py6
-rw-r--r--paste/util/scgiserver.py8
-rw-r--r--paste/util/template.py12
-rw-r--r--paste/util/threadedprint.py2
9 files changed, 20 insertions, 20 deletions
diff --git a/paste/util/UserDict24.py b/paste/util/UserDict24.py
index e5b64f5..5fd9778 100644
--- a/paste/util/UserDict24.py
+++ b/paste/util/UserDict24.py
@@ -162,6 +162,6 @@ class DictMixin:
return cmp(dict(self.iteritems()), other)
def __len__(self):
return len(self.keys())
-
+
def __nonzero__(self):
return bool(self.iteritems())
diff --git a/paste/util/dateinterval.py b/paste/util/dateinterval.py
index 5109e28..80fe347 100644
--- a/paste/util/dateinterval.py
+++ b/paste/util/dateinterval.py
@@ -7,7 +7,7 @@ years (leap years in particular).
Accepts (y)ear, (b)month, (w)eek, (d)ay, (h)our, (m)inute, (s)econd.
-Exports only timeEncode and timeDecode functions.
+Exports only timeEncode and timeDecode functions.
"""
import re
@@ -33,7 +33,7 @@ timeValues = {
timeOrdered = list(timeValues.items())
timeOrdered.sort(key=lambda x: x[1], reverse=True)
-
+
def interval_encode(seconds, include_sign=False):
"""Encodes a number of seconds (representing a time interval)
into a form like 1h2d3s.
diff --git a/paste/util/filemixin.py b/paste/util/filemixin.py
index 10a9e7c..b06b039 100644
--- a/paste/util/filemixin.py
+++ b/paste/util/filemixin.py
@@ -50,4 +50,4 @@ class FileMixin(object):
for line in lines:
self.write(line)
-
+
diff --git a/paste/util/finddata.py b/paste/util/finddata.py
index 05c8546..bb7c760 100644
--- a/paste/util/finddata.py
+++ b/paste/util/finddata.py
@@ -48,7 +48,7 @@ def find_package_data(
Note patterns use wildcards, or can be exact paths (including
leading ``./``), and all searching is case-insensitive.
"""
-
+
out = {}
stack = [(convert_path(where), '', package, only_in_packages)]
while stack:
diff --git a/paste/util/findpackage.py b/paste/util/findpackage.py
index 68b5e8b..9d653e5 100644
--- a/paste/util/findpackage.py
+++ b/paste/util/findpackage.py
@@ -23,4 +23,4 @@ def find_package(dir):
raise ValueError(
"%s is not under any path found in sys.path" % orig_dir)
last_dir = dir
-
+
diff --git a/paste/util/looper.py b/paste/util/looper.py
index efe7fdf..dd0c6fd 100644
--- a/paste/util/looper.py
+++ b/paste/util/looper.py
@@ -26,9 +26,9 @@ import six
class looper(object):
"""
Helper for looping (particularly in templates)
-
+
Use this like::
-
+
for loop, item in looper(seq):
if loop.first:
...
@@ -152,4 +152,4 @@ class loop_pos(object):
return getter(item) != getter(other)
else:
return item[getter] != other[getter]
-
+
diff --git a/paste/util/scgiserver.py b/paste/util/scgiserver.py
index f65294d..1c86c86 100644
--- a/paste/util/scgiserver.py
+++ b/paste/util/scgiserver.py
@@ -42,7 +42,7 @@ class SWAP(scgi_server.SCGIHandler):
"""
app_obj = None
prefix = None
-
+
def __init__(self, *args, **kwargs):
assert self.app_obj, "must set app_obj"
assert self.prefix is not None, "must set prefix"
@@ -85,7 +85,7 @@ class SWAP(scgi_server.SCGIHandler):
chunks = []
def write(data):
chunks.append(data)
-
+
def start_response(status, response_headers, exc_info=None):
if exc_info:
try:
@@ -106,7 +106,7 @@ class SWAP(scgi_server.SCGIHandler):
try:
for data in result:
chunks.append(data)
-
+
# Before the first output, send the stored headers
if not headers_set:
# Error -- the app never called start_response
@@ -115,7 +115,7 @@ class SWAP(scgi_server.SCGIHandler):
chunks = ["XXX start_response never called"]
else:
status, response_headers = headers_sent[:] = headers_set
-
+
output.write('Status: %s\r\n' % status)
for header in response_headers:
output.write('%s: %s\r\n' % header)
diff --git a/paste/util/template.py b/paste/util/template.py
index afeb353..981816b 100644
--- a/paste/util/template.py
+++ b/paste/util/template.py
@@ -251,7 +251,7 @@ class Template(object):
'(no default_encoding provided)' % value)
value = value.encode(self.default_encoding)
return value
-
+
def _add_line_info(self, msg, pos):
msg = "%s at line %s column %s" % (
@@ -479,7 +479,7 @@ def trim_lex(tokens):
next = next[m.end():]
tokens[i+1] = next
return tokens
-
+
def find_position(string, index):
"""Given a string and index, return (line, column)"""
@@ -506,7 +506,7 @@ def parse(s, name=None):
[('cond', (1, 3), ('if', (1, 3), 'x', ['a']), ('elif', (1, 12), 'y', ['b']), ('else', (1, 23), None, ['c']))]
Some exceptions::
-
+
>>> parse('{{continue}}')
Traceback (most recent call last):
...
@@ -627,7 +627,7 @@ def parse_one_cond(tokens, name, context):
return part, tokens
next, tokens = parse_expr(tokens, name, context)
content.append(next)
-
+
def parse_for(tokens, name, context):
first, pos = tokens[0]
tokens = tokens[1:]
@@ -755,5 +755,5 @@ def fill_command(args=None):
if __name__ == '__main__':
from paste.util.template import fill_command
fill_command()
-
-
+
+
diff --git a/paste/util/threadedprint.py b/paste/util/threadedprint.py
index ae7dc0d..e69993e 100644
--- a/paste/util/threadedprint.py
+++ b/paste/util/threadedprint.py
@@ -114,7 +114,7 @@ class PrintCatcher(filemixin.FileMixin):
self._default.read(*args)
else:
catchers[name].read(*args)
-
+
def _writedefault(self, name, v):
self._default.write(v)