Skip to content

Commit c3618cb

Browse files
committed
Added line number to warning errors
1 parent 244d294 commit c3618cb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

utils/cache_builder.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ def main():
7575
b_bank = b''
7676
i_bank = 0
7777
i_games = 0
78+
i_count = 1
7879
for line in content:
7980
arr_line = line.split(',')
81+
i_count += 1
8082
if arr_line and len(arr_line) > 3:
8183
i_games += 1
8284
LOGGER.debug('{0} . {1}'.format(len(arr_banks), arr_line))
@@ -114,8 +116,8 @@ def main():
114116
LOGGER.error(str_msg)
115117
raise Exception(str_msg)
116118
else:
117-
str_msg = _('Bad Line: {0}')
118-
LOGGER.warning(str_msg.format(line))
119+
str_msg = _('Bad Line (number {0}): {1}')
120+
LOGGER.warning(str_msg.format(i_count, line))
119121

120122
if i_bank > 0:
121123
if i_bank < 16207:

0 commit comments

Comments
 (0)