Discussion:
[uzbl-dev] [PATCH] Fix instantiation of ConfigParser
Damien Goutte-Gattat
2015-10-23 13:41:31 UTC
Permalink
Hi Uzbl developers,

The configuration file parser introduced into the event manager in
commit c227b551 does not work; any attempt to read even a properly
formatted ini file would lead to an error.

This is because the call to the ConfigParserParser is incorrect:
the `interpolation' parameter expects an *instantiated* interpolation
provider (see [1]).

The one-line patch below adds the needed parenthesis to correctly
instantiate an ExtendedInterpolation object.


[1] https://bitbucket.org/ambv/configparser/issues/9/setting-extendedinterpolation-as

---
uzbl/event_manager.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/uzbl/event_manager.py b/uzbl/event_manager.py
index 740e43c..39b3573 100755
--- a/uzbl/event_manager.py
+++ b/uzbl/event_manager.py
@@ -517,7 +517,7 @@ def main():
else:
opts.pid_file = expandpath(opts.pid_file)

- config = configparser.ConfigParser(interpolation=configparser.ExtendedInterpolation)
+ config = configparser.ConfigParser(interpolation=configparser.ExtendedInterpolation())
config.read(opts.config)

# Set default log file location
--
1.8.4
Ben Boeckel
2015-10-27 02:48:23 UTC
Permalink
Post by Damien Goutte-Gattat
The configuration file parser introduced into the event manager in
commit c227b551 does not work; any attempt to read even a properly
formatted ini file would lead to an error.
the `interpolation' parameter expects an *instantiated* interpolation
provider (see [1]).
The one-line patch below adds the needed parenthesis to correctly
instantiate an ExtendedInterpolation object.
Oops, thanks.

PR made here:

https://github.com/uzbl/uzbl/pull/173

--Ben

Loading...