Skip to content

Commit

Permalink
findinfiles: Skip empty strings when building file pattern regexp
Browse files Browse the repository at this point in the history
When building the regexp for file patterns when exclude_re is
false, skip empty strings.

This fixes issue spyder-ide#7811 when exclude_re is false.
  • Loading branch information
ehabkost committed Sep 2, 2018
1 parent dd9dae9 commit 0920548
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spyder/widgets/findinfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,8 @@ def get_options(self, all=False):

if not exclude_re:
items = [fnmatch.translate(item.strip())
for item in exclude.split(",")]
for item in exclude.split(",")
if item.strip() != '']
exclude = '|'.join(items)

# Validate regular expressions:
Expand Down

0 comments on commit 0920548

Please sign in to comment.