Permalink
Browse files

Make normalize_whitespace usable again

The calls to self.normalize_whitespace fail at the moment
with the error:

  TypeError: normalize_whitespace() takes exactly 1 argument (2 given)

We could just add self as the first argument to
self.normalize_whitespace, but since this method isn't
dependent on self, we might as well make it a static
method.
  • Loading branch information...
1 parent 3df104a commit d7facd5907fd7adc577aa743bb77ad6556b8aeac @mhl mhl committed Nov 9, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 mapit/management/command_utils.py
@@ -12,6 +12,7 @@ def __init__(self, *args, **kwargs):
def characters(self, content):
self.content += content
+ @staticmethod
def normalize_whitespace(s):
return re.sub('(?us)\s+', ' ', s).strip()

0 comments on commit d7facd5

Please sign in to comment.