summaryrefslogtreecommitdiff
path: root/plugins/bob.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2016-08-21 15:27:53 +0200
committermathieui <mathieui@mathieui.net>2016-08-21 15:39:30 +0200
commit84e59b05ff0a17178da9ecdb6c5d084e48b42763 (patch)
tree224948d7c3d49a0005bff9390260357b3ec9c60e /plugins/bob.py
parent6c270b363ac018dfd4d66b23af95efcc35610da0 (diff)
downloadpoezio-84e59b05ff0a17178da9ecdb6c5d084e48b42763.tar.gz
poezio-84e59b05ff0a17178da9ecdb6c5d084e48b42763.tar.bz2
poezio-84e59b05ff0a17178da9ecdb6c5d084e48b42763.tar.xz
poezio-84e59b05ff0a17178da9ecdb6c5d084e48b42763.zip
Don’t call input completion() functions inside completion methods
Use a placeholder object that can run it afterwards, so that we don’t have side effects inside those functions.
Diffstat (limited to 'plugins/bob.py')
-rw-r--r--plugins/bob.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/bob.py b/plugins/bob.py
index b2a6441e..527692b3 100644
--- a/plugins/bob.py
+++ b/plugins/bob.py
@@ -22,6 +22,7 @@ Configuration options
The time during which the file should stay in cache on the receiving side.
"""
+from poezio.core.structs import Completion
from poezio.plugin import BasePlugin
from poezio import tabs
@@ -72,4 +73,4 @@ class Plugin(BasePlugin):
mime_type = guess_type(filename)[0]
if mime_type is not None and mime_type.startswith('image/'):
images.append(filename)
- return the_input.auto_completion(images, quotify=False)
+ return Completion(the_input.auto_completion, images, quotify=False)