Simplify code

This commit is contained in:
Markus Unterwaditzer 2014-05-30 17:17:10 +02:00
parent d5435ed534
commit ab0da10e56

View file

@ -20,7 +20,7 @@ def _process_properties(*s):
rv.add(key + ':') rv.add(key + ':')
rv.add(key + ';') rv.add(key + ';')
return frozenset(rv) return tuple(rv)
IGNORE_PROPS = _process_properties( IGNORE_PROPS = _process_properties(
@ -48,8 +48,7 @@ def normalize_item(text, ignore_props=IGNORE_PROPS, use_icalendar=True):
return u'\r\n'.join(line.strip() return u'\r\n'.join(line.strip()
for line in lines for line in lines
if line.strip() and if line.strip() and
not any(line.startswith(p) not line.startswith(IGNORE_PROPS))
for p in IGNORE_PROPS))
def hash_item(text): def hash_item(text):