Skip to content

Commit c65e541

Browse files
committed
update path walker wrapper for error handling
1 parent 88fc142 commit c65e541

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

core/util/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
HARRIS_AFFINE = ('haraff', 1000)
3535
HESSIAN_AFFINE = ('hesaff', 500)
3636

37+
SUFFIX_PPM = 'ppm'
3738

3839

3940

core/util/util.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,15 @@ def walk_wrapper(path_from, path_to, _ext=None):
3535
if os.path.exists(_to_file):
3636
logger.info('skip for exists: {}'.format(_to_file))
3737
continue
38-
func(_from_file, _to_file)
38+
try:
39+
func(_from_file, _to_file)
40+
logger.info('[{}] from {} to {}'.format(
41+
func.func_name, _from_file, _to_file
42+
))
43+
except Exception, e:
44+
logger.info('Failed [{}] {}, error msg: {}'.format(
45+
func.func_name, _from_file, str(e)
46+
))
3947

4048
return walk_wrapper
4149

0 commit comments

Comments
 (0)