Don't use global preferences in plugins.
This commit is contained in:
parent
c5705b2136
commit
69103fdf49
@ -62,7 +62,7 @@ class EventLogging:
|
|||||||
self.parent = interface
|
self.parent = interface
|
||||||
# Create an options file and try to load existing Values
|
# Create an options file and try to load existing Values
|
||||||
self.config_file = deluge.common.CONFIG_DIR + "/event_logging.conf"
|
self.config_file = deluge.common.CONFIG_DIR + "/event_logging.conf"
|
||||||
self.config = deluge.pref.Preferences(self.config_file)
|
self.config = deluge.pref.Preferences(self.config_file, False)
|
||||||
try:
|
try:
|
||||||
self.config.load()
|
self.config.load()
|
||||||
except IOError:
|
except IOError:
|
||||||
|
|||||||
@ -46,7 +46,7 @@ class TorrentNotification:
|
|||||||
|
|
||||||
# Create an options file and try to load existing Values
|
# Create an options file and try to load existing Values
|
||||||
self.config_file = deluge.common.CONFIG_DIR + "/notification.conf"
|
self.config_file = deluge.common.CONFIG_DIR + "/notification.conf"
|
||||||
self.config = deluge.pref.Preferences(self.config_file)
|
self.config = deluge.pref.Preferences(self.config_file, False)
|
||||||
try:
|
try:
|
||||||
self.config.load()
|
self.config.load()
|
||||||
except IOError:
|
except IOError:
|
||||||
|
|||||||
@ -44,7 +44,7 @@ class TorrentPeers:
|
|||||||
self.parent = interface
|
self.parent = interface
|
||||||
self.manager = core
|
self.manager = core
|
||||||
self.config_file = deluge.common.CONFIG_DIR + "/peers.conf"
|
self.config_file = deluge.common.CONFIG_DIR + "/peers.conf"
|
||||||
self.config = deluge.pref.Preferences(self.config_file)
|
self.config = deluge.pref.Preferences(self.config_file, False)
|
||||||
try:
|
try:
|
||||||
self.config.load()
|
self.config.load()
|
||||||
except IOError:
|
except IOError:
|
||||||
|
|||||||
@ -57,7 +57,7 @@ class TorrentPieces:
|
|||||||
self.manager = core
|
self.manager = core
|
||||||
self.parent = interface
|
self.parent = interface
|
||||||
self.config_file = deluge.common.CONFIG_DIR + "/pieces.conf"
|
self.config_file = deluge.common.CONFIG_DIR + "/pieces.conf"
|
||||||
self.config = deluge.pref.Preferences(self.config_file)
|
self.config = deluge.pref.Preferences(self.config_file, False)
|
||||||
try:
|
try:
|
||||||
self.config.load()
|
self.config.load()
|
||||||
except IOError:
|
except IOError:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user