Skip to content

Commit cec6214

Browse files
committed
Fix split_by_crlf
1 parent d02f243 commit cec6214

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

website/routes.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,8 @@ def home():
3737
return render_template('home.html', user=user, clients=clients)
3838

3939

40-
def split_by_crlf(val:str):
41-
return [
42-
item for item in
43-
[item.strip() for item in val.split('\r\n')]
44-
if item != ''
45-
]
40+
def split_by_crlf(s):
41+
return [v for v in s.splitlines() if v]
4642

4743

4844
@bp.route('/create_client', methods=('GET', 'POST'))

0 commit comments

Comments
 (0)