From 85f763459b04098c4c73721b58f0769a17801446 Mon Sep 17 00:00:00 2001
From: Francesco Frassinelli <fraph24@gmail.com>
Date: Wed, 18 Nov 2015 22:15:39 +0100
Subject: [PATCH] HTMLParseError replaced with generic Exception
HTMLParseError raises a DeprecationWarning in Python 3.4 and it has been removed in Python 3.5.
https://hg.python.org/cpython/file/3.4/Lib/html/parser.py#l171
---
src/gnome_abrt/url/urltitle.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gnome_abrt/url/urltitle.py b/src/gnome_abrt/url/urltitle.py
index 4c3d128..675d178 100644
--- a/src/gnome_abrt/url/urltitle.py
+++ b/src/gnome_abrt/url/urltitle.py
@@ -21,7 +21,7 @@ import sys
import threading
import logging
from urllib.request import urlopen
-from html.parser import HTMLParser, HTMLParseError
+from html.parser import HTMLParser
def get_url_title(url):
@@ -85,7 +85,7 @@ class HTMLTitleGetter(HTMLParser):
tgt = HTMLTitleGetter()
try:
tgt.feed(data)
- except HTMLParseError as ex:
+ except Exception as ex:
logging.debug("{1} ('{0}')".format(data, str(ex)))
# Hopefully title is parsed correctly
--
2.4.3