Commit 824fcf08 authored by Lorenz Steinert's avatar Lorenz Steinert

ignore empty lines in fallback files

parent a56791d3
......@@ -155,8 +155,10 @@ class FsrLdap:
'r', 'utf-8') as fobj:
fsr = sorted([re.sub(re.escape('\t'), ' ',
line.rstrip('\n'))
for line in fobj.readlines()],
for line in fobj.readlines()
if line.rstrip('\n')],
key=lambda x: ''.join(x.split(' ')[::-1]))
print(fsr)
return fsr
return Error.NO_FILE
......@@ -211,8 +213,10 @@ class FsrLdap:
'r', 'utf-8') as fobj:
fsr_extern = sorted([re.sub(re.escape('\t'), ' ',
line.rstrip('\n'))
for line in fobj.readlines()],
for line in fobj.readlines()
if line.rstrip('\n')],
key=lambda x: ''.join(x.split(' ')[::-1]))
print(fsr_extern)
return fsr_extern
return Error.NO_FILE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment