mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-10 19:39:15 +00:00
handle empty list
This commit is contained in:
@@ -273,6 +273,8 @@ def must_ignore(paths, ignores, debug=False):
|
|||||||
def uniq_list(a_list):
|
def uniq_list(a_list):
|
||||||
"""unique elements of a list while preserving order"""
|
"""unique elements of a list while preserving order"""
|
||||||
new = []
|
new = []
|
||||||
|
if not a_list:
|
||||||
|
return new
|
||||||
for elem in a_list:
|
for elem in a_list:
|
||||||
if elem not in new:
|
if elem not in new:
|
||||||
new.append(elem)
|
new.append(elem)
|
||||||
|
|||||||
Reference in New Issue
Block a user