diff options
author | Yurii Kolesnykov | 2020-06-06 23:16:48 +0300 |
---|---|---|
committer | Yurii Kolesnykov | 2020-06-06 23:16:48 +0300 |
commit | 8af5c60ff37f0f040ca57c57a57cfcf1fdcfd1e3 (patch) | |
tree | 1f70375d909a6f2450fbff5dc4fe64c207cf7159 /configparser_api_changes.patch | |
parent | 468a19f996b920b3e6205df037731e7e55e2d87c (diff) | |
download | aur-8af5c60ff37f0f040ca57c57a57cfcf1fdcfd1e3.tar.gz |
ports from debian
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Diffstat (limited to 'configparser_api_changes.patch')
-rw-r--r-- | configparser_api_changes.patch | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/configparser_api_changes.patch b/configparser_api_changes.patch index 04b46d9b8f21..9463840efb03 100644 --- a/configparser_api_changes.patch +++ b/configparser_api_changes.patch @@ -1,21 +1,49 @@ From: Andrew Starr-Bochicchio <asb@debian.org> +Date: Tue, 4 Jun 2019 15:33:36 +0300 Subject: Update for changes in ConfigParser api. -Bug: https://bugs.launchpad.net/kazam/+bug/1500083 -Index: kazam/kazam/backend/config.py -=================================================================== ---- kazam.orig/kazam/backend/config.py 2013-03-13 20:25:20.917993000 -0400 -+++ kazam/kazam/backend/config.py 2015-10-12 21:25:30.355157111 -0400 -@@ -98,9 +98,10 @@ +Bug: #801203, #916416, LP: #1500083 +Forwarded: https://github.com/hzbd/kazam/pull/21 +Author: Andrew Starr-Bochicchio <asb@debian.org> +Author: Sergey Spitsyn <sswebcoder@gmail.com> +Reviewed-by: Nicolas Braud-Santoni <nicoo@debian.org> +--- + kazam/backend/config.py | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/kazam/backend/config.py b/kazam/backend/config.py +index 59a6c5a..2274435 100644 +--- a/kazam/backend/config.py ++++ b/kazam/backend/config.py +@@ -73,7 +73,7 @@ class KazamConfig(ConfigParser): + CONFIGFILE = os.path.join(CONFIGDIR, "kazam.conf") + + def __init__(self): +- ConfigParser.__init__(self, self.DEFAULTS[0]['keys']) ++ super().__init__(self) + if not os.path.isdir(self.CONFIGDIR): + os.makedirs(self.CONFIGDIR) + if not os.path.isfile(self.CONFIGFILE): +@@ -98,9 +98,9 @@ class KazamConfig(ConfigParser): if d_key == key: return d_section["keys"][key] - def get(self, section, key): -+ def get(self, section, key, raw=True, fallback=None): ++ def get(self, section, key, **kwargs): try: - return ConfigParser.get(self, section, key) -+ return super(KazamConfig, self).get(section, -+ key, raw=True, fallback=fallback) ++ return super(KazamConfig, self).get(section, key, **kwargs) except NoSectionError: default = self.find_default(section, key) self.set(section, key, default) +@@ -122,9 +122,7 @@ class KazamConfig(ConfigParser): + def set(self, section, option, value): + # If the section referred to doesn't exist (rare case), + # then create it +- if not self.has_section(section): +- self.add_section(section) +- ConfigParser.set(self, section, option, str(value)) ++ super().set(section, option, str(value)) + + def write(self): + file_ = open(self.CONFIGFILE, "w") |