From f5acd2c14c68a2d26b87f2570f9c64d150ce05e2 Mon Sep 17 00:00:00 2001 From: pictuga Date: Mon, 16 Mar 2020 17:43:03 +0100 Subject: [PATCH] feeds: use RawConfigParser This one does not try to replace non-std characters (e.g. %) --- morss/feeds.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/morss/feeds.py b/morss/feeds.py index 7501b69..4b6e0e1 100644 --- a/morss/feeds.py +++ b/morss/feeds.py @@ -29,12 +29,12 @@ except ImportError: try: from StringIO import StringIO from urllib2 import urlopen - from ConfigParser import ConfigParser + from ConfigParser import RawConfigParser except ImportError: # python > 3 from io import StringIO from urllib.request import urlopen - from configparser import ConfigParser + from configparser import RawConfigParser try: basestring @@ -46,7 +46,7 @@ def parse_rules(filename=None): if not filename: filename = os.path.join(os.path.dirname(__file__), 'feedify.ini') - config = ConfigParser() + config = RawConfigParser() config.read(filename) rules = dict([(x, dict(config.items(x))) for x in config.sections()])