mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Simplify code
This commit is contained in:
parent
d5435ed534
commit
ab0da10e56
1 changed files with 2 additions and 3 deletions
|
|
@ -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):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue