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 bf6de4a commit 17e3d21
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 @@ -561,7 +561,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 17e3d21

Please sign in to comment.