1
0
mirror of https://github.com/gryf/slack-backup.git synced 2025-12-17 11:30:25 +01:00

Dropping Python 2 support

This commit is contained in:
2016-11-26 19:12:44 +01:00
parent 11241e9d8b
commit af7f24e9a9
8 changed files with 12 additions and 41 deletions

View File

@@ -1,19 +1,14 @@
# -*- coding: utf-8 -*-
"""
Reporters module.
There are several classes for specific format reporting, and also some of the
slack conversation/convention parsers.
"""
from __future__ import absolute_import, division, print_function
import os
import errno
import html.parser
import logging
import re
try:
from html.parser import HTMLParser
except ImportError:
from HTMLParser import HTMLParser
from slack_backup import objects as o
from slack_backup import utils
@@ -269,7 +264,7 @@ class TextReporter(Reporter):
def _remove_entities(self, text):
"""replace html entites into appropriate chars"""
text = HTMLParser().unescape(text)
return html.parser.HTMLParser().unescape(text)
def _filter_slackid(self, text):
"""filter out all of the id from slack"""