Skip to content

Commit

Permalink
fix pypy isfile failure
Browse files Browse the repository at this point in the history
  • Loading branch information
titusz committed Jul 21, 2015
1 parent be6711a commit fae5b9e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/onixcheck/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
except ImportError:
from os import walk
from os import listdir as scandir
from os.path import isfile
from os.path import isdir
has_scandir = False


Expand All @@ -37,9 +37,8 @@ def iter_files(root, exts=None, recursive=False):
yield entry.path
else:
ext = splitext(entry)[-1].lstrip('.').lower()
if isfile(entry) and matches(ext):
yield entry

if not isdir(entry) and matches(ext):
yield join(root, entry)
else:
for root, folders, files in walk(root):
for f in files:
Expand Down

0 comments on commit fae5b9e

Please sign in to comment.