Skip to content

Commit

Permalink
Make normalize_whitespace usable again
Browse files Browse the repository at this point in the history
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
mhl committed Nov 9, 2012
1 parent 3df104a commit d7facd5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mapit/management/command_utils.py
Expand Up @@ -12,6 +12,7 @@ def __init__(self, *args, **kwargs):
def characters(self, content): def characters(self, content):
self.content += content self.content += content


@staticmethod
def normalize_whitespace(s): def normalize_whitespace(s):
return re.sub('(?us)\s+', ' ', s).strip() return re.sub('(?us)\s+', ' ', s).strip()


Expand Down

0 comments on commit d7facd5

Please sign in to comment.