diff --git a/atreal_openads/utils.py b/atreal_openads/utils.py index 6fcafea..f8c3059 100644 --- a/atreal_openads/utils.py +++ b/atreal_openads/utils.py @@ -29,11 +29,10 @@ import copy import mimetypes import sys -from HTMLParser import HTMLParser - from django.urls import reverse_lazy from django.utils import six from django.utils.encoding import force_text +from django.utils.six.moves.html_parser import HTMLParser def to_dash_case(camel_str): @@ -52,11 +51,10 @@ def force_encoded_string_output(func, default_enc='utf-8'): return func -class MLStripper(HTMLParser): +class MLStripper(HTMLParser, object): """HTML parser that removes html tags.""" - # pylint: disable=super-init-not-called def __init__(self): - self.reset() + super(MLStripper, self).__init__() self.fed = [] def handle_data(self, data):