summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-04-05 21:42:27 +0200
committermathieui <mathieui@mathieui.net>2014-04-05 21:42:27 +0200
commit7c7f9b2f4757a1ec4ab4a51d6dfd8d7254d0e705 (patch)
treed15f357b9c0ac74ea2ec8585d4594b2b5bf32d4f /src/core
parent8def5609d925c89004c906d67a7e1d3028706f32 (diff)
downloadpoezio-7c7f9b2f4757a1ec4ab4a51d6dfd8d7254d0e705.tar.gz
poezio-7c7f9b2f4757a1ec4ab4a51d6dfd8d7254d0e705.tar.bz2
poezio-7c7f9b2f4757a1ec4ab4a51d6dfd8d7254d0e705.tar.xz
poezio-7c7f9b2f4757a1ec4ab4a51d6dfd8d7254d0e705.zip
Do not instantiate Keyboard at module-level
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/core.py b/src/core/core.py
index 9ae68c55..1a496466 100644
--- a/src/core/core.py
+++ b/src/core/core.py
@@ -37,7 +37,7 @@ from contact import Contact, Resource
from daemon import Executor
from data_forms import DataFormsTab
from fifo import Fifo
-from keyboard import keyboard
+from keyboard import Keyboard
from logger import logger
from plugin_manager import PluginManager
from roster import roster
@@ -69,6 +69,7 @@ class Core(object):
self.running = True
self.xmpp = singleton.Singleton(connection.Connection)
self.xmpp.core = self
+ self.keyboard = Keyboard()
roster.set_node(self.xmpp.client_roster)
decorators.refresh_wrapper.core = self
self.paused = False
@@ -1390,10 +1391,10 @@ class Core(object):
occurs. In that case we do not return (we loop until we get
a non-None value), but we check for timed events instead.
"""
- res = keyboard.get_user_input(self.stdscr)
+ res = self.keyboard.get_user_input(self.stdscr)
while res is None:
self.check_timed_events()
- res = keyboard.get_user_input(self.stdscr)
+ res = self.keyboard.get_user_input(self.stdscr)
return res
def escape_next_key(self):