Late import twisted's reactor, it allows the gtk reactor to be proper installed.

This commit is contained in:
Pedro Algarvio 2011-04-22 11:33:45 +01:00
parent 03325c5f48
commit 233e814547
1 changed files with 2 additions and 1 deletions

View File

@ -72,7 +72,6 @@ import logging
import shutil
import os
from twisted.internet import reactor
import deluge.common
json = deluge.common.json
@ -220,6 +219,7 @@ what is currently in the config and it could not convert the value
self.__config[key] = value
# Run the set_function for this key if any
from twisted.internet import reactor
try:
for func in self.__set_functions[key]:
reactor.callLater(0, func, key, value)
@ -288,6 +288,7 @@ what is currently in the config and it could not convert the value
"""
del self.__config[key]
# We set the save_timer for 5 seconds if not already set
from twisted.internet import reactor
if not self._save_timer or not self._save_timer.active():
self._save_timer = reactor.callLater(5, self.save)