aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--_pytest/conftest.py5
-rw-r--r--wee_slack.py5
3 files changed, 11 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8673f9c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.pyc
+.cache/
+*.sublime-*
diff --git a/_pytest/conftest.py b/_pytest/conftest.py
index 7a6f39a..43d4a74 100644
--- a/_pytest/conftest.py
+++ b/_pytest/conftest.py
@@ -71,6 +71,10 @@ class FakeWeechat():
return "0x8a8a8a8b"
def prefix(self, type):
return ""
+ def config_get_plugin(self, key):
+ return ""
+ def color(self, name):
+ return ""
def __getattr__(self, name):
def method(*args):
pass
@@ -87,6 +91,7 @@ def mock_weechat():
wee_slack.slack_debug = "debug_buffer_ptr"
wee_slack.STOP_TALKING_TO_SLACK = False
wee_slack.proc = {}
+ wee_slack.weechat_version = 0x10500000
pass
diff --git a/wee_slack.py b/wee_slack.py
index 5fd1648..269904f 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3238,7 +3238,7 @@ class PluginConfig(object):
# value is used to set the default for any settings not already defined.
# Following this procedure, the keys remain the same, but the values are
# the real (python) values of the settings.
- settings = {
+ default_settings = {
'background_load_all_history': Setting(
default='false',
desc='Load history for each channel in the background as soon as it'
@@ -3322,11 +3322,12 @@ class PluginConfig(object):
# Set missing settings to their defaults. Load non-missing settings from
# weechat configs.
def __init__(self):
+ self.settings = {}
# Set all descriptions, replace the values in the dict with the
# default setting value rather than the (setting,desc) tuple.
# Use items() rather than iteritems() so we don't need to worry about
# invalidating the iterator.
- for key, (default, desc) in self.settings.items():
+ for key, (default, desc) in self.default_settings.items():
w.config_set_desc_plugin(key, desc)
self.settings[key] = default