Changeset 6b396f
- Timestamp:
- 12/21/2009 01:58:24 PM (15 years ago)
- Children:
- 6a8e023
- Parents:
- b2990e
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
rb2990e r6b396f 13 13 * Fix blocklist status icon not opening the blocklist preference 14 14 page in certain locales 15 * Fix blocklist not recognising comments that begin with whitespace 16 * Minor speedup in parsing blocklists 15 17 16 18 === Deluge 1.2.0_rc5 (17 December 2009) === -
deluge/plugins/blocklist/blocklist/readers.py
rb2990e r6b396f 61 61 def is_ignored(self, line): 62 62 """Ignore commented lines and blank lines""" 63 return line.startswith('#') or not line.strip() 63 line = line.strip() 64 return line.startswith('#') or not line 64 65 65 66 def is_valid(self): … … 81 82 return valid 82 83 84 @raiseError(ReaderParseError) 83 85 def readranges(self): 84 86 """Yields each ip range from the file""" … … 91 93 class EmuleReader(BaseReader): 92 94 """Blocklist reader for emule style blocklists""" 93 @raiseError(ReaderParseError)94 95 def parse(self, line): 95 96 return line.strip().split(" , ")[0].split(" - ") … … 97 98 class SafePeerReader(BaseReader): 98 99 """Blocklist reader for SafePeer style blocklists""" 99 @raiseError(ReaderParseError)100 100 def parse(self, line): 101 101 return line.strip().split(":")[-1].split("-")
Note:
See TracChangeset
for help on using the changeset viewer.