Skip to content

Commit daebb17

Browse files
committed
Cosmetics.
1 parent 614c438 commit daebb17

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/extractcode/__init__.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
from __future__ import print_function, absolute_import
2626

27+
import logging
2728
import os
2829
import posixpath
2930
import re
@@ -32,6 +33,13 @@
3233
from commoncode import fileutils
3334

3435

36+
logger = logging.getLogger(__name__)
37+
DEBUG = False
38+
# import sys
39+
# logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)
40+
# logger.setLevel(logging.DEBUG)
41+
42+
3543
root_dir = os.path.join(os.path.dirname(__file__), 'bin')
3644

3745
# Suffix added to extracted target_dir paths
@@ -134,9 +142,8 @@ def extracted_files(location):
134142
Yield the locations of extracted files in a directory location.
135143
"""
136144
assert location
137-
for top, _dirs, files in os.walk(location, topdown=True):
138-
for f in files:
139-
yield os.path.join(top, f)
145+
logger.debug('extracted_files for: %(location)r' % locals())
146+
return fileutils.file_iter(location)
140147

141148

142149
def new_name(location, is_dir=False):

0 commit comments

Comments
 (0)