Ticket #1099: labelplugin.patch.txt

File labelplugin.patch.txt, 1.5 KB (added by Chase, 15 years ago)
Line 
1Index: deluge/plugins/label/label/core.py
2===================================================================
3--- deluge/plugins/label/label/core.py (revision 6018)
4+++ deluge/plugins/label/label/core.py (working copy)
5@@ -146,7 +146,7 @@
6
7 ## Utils ##
8 def clean_config(self):
9- "remove invalid data from config-file"
10+ """remove invalid data from config-file"""
11 for torrent_id, label_id in list(self.torrent_labels.iteritems()):
12 if (not label_id in self.labels) or (not torrent_id in self.torrents):
13 log.debug("label: rm %s:%s" % (torrent_id,label_id))
14@@ -191,7 +191,7 @@
15
16 @export
17 def remove(self, label_id):
18- "remove a label"
19+ """remove a label"""
20 CheckInput(label_id in self.labels, _("Unknown Label"))
21 del self.labels[label_id]
22 self.clean_config()
23@@ -226,7 +226,7 @@
24 )
25
26 def _has_auto_match(self, torrent ,label_options):
27- "match for auto_add fields"
28+ """match for auto_add fields"""
29 for tracker_match in label_options["auto_add_trackers"]:
30 for tracker in torrent.trackers:
31 if tracker_match in tracker["url"]:
32@@ -299,7 +299,7 @@
33
34 @export()
35 def get_config(self):
36- "see : label_set_config"
37+ """see : label_set_config"""
38 return dict((key, self.config[key]) for key in CORE_OPTIONS if key in self.config.config)
39
40 @export()