Late import twisted's reactor, it allows the gtk reactor to be proper installed.
This commit is contained in:
parent
03325c5f48
commit
233e814547
|
@ -72,7 +72,6 @@ import logging
|
||||||
import shutil
|
import shutil
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from twisted.internet import reactor
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
|
||||||
json = deluge.common.json
|
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
|
self.__config[key] = value
|
||||||
# Run the set_function for this key if any
|
# Run the set_function for this key if any
|
||||||
|
from twisted.internet import reactor
|
||||||
try:
|
try:
|
||||||
for func in self.__set_functions[key]:
|
for func in self.__set_functions[key]:
|
||||||
reactor.callLater(0, func, key, value)
|
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]
|
del self.__config[key]
|
||||||
# We set the save_timer for 5 seconds if not already set
|
# 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():
|
if not self._save_timer or not self._save_timer.active():
|
||||||
self._save_timer = reactor.callLater(5, self.save)
|
self._save_timer = reactor.callLater(5, self.save)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue