Skip to content

Commit

Permalink
Changed 'Invalid char' from error to warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
kounch committed Jul 8, 2020
1 parent 47124d3 commit 4716488
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions utils/bdt_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from pathlib2 import Path

__MY_NAME__ = 'bdt_builder.py'
__MY_VERSION__ = '0.11'
__MY_VERSION__ = '0.12'

DICT_EXTS = {
'nex': 15,
Expand Down Expand Up @@ -242,25 +242,23 @@ def scan_dir(input_dir, str_prefix, str_detection):

if ',' in str(child_path):
str_msg = _('Invalid character in path: {0}')
LOGGER.error(str_msg.format(str(child_path)))
str_msg = _('Invalid Char!')
raise IOError(str_msg)

if str_detection == 'd':
if str(zxdir.name) != '':
if str(zxdir.name).upper() == '3DOS':
zxname = zxdir.parent.name
else:
zxname = zxdir.name

if zxname not in dict_tmp:
dict_tmp[zxname] = {}

if zxext in DICT_EXTS:
dict_tmp[zxname][zxext] = [zxdir, zxfile]

if zxext in ARR_IMGS:
dict_tmp[zxname][zxext] = [zxdir, zxfile]
LOGGER.warning(str_msg.format(str(child_path)))
else:
if str_detection == 'd':
if str(zxdir.name) != '':
if str(zxdir.name).upper() == '3DOS':
zxname = zxdir.parent.name
else:
zxname = zxdir.name

if zxname not in dict_tmp:
dict_tmp[zxname] = {}

if zxext in DICT_EXTS:
dict_tmp[zxname][zxext] = [zxdir, zxfile]

if zxext in ARR_IMGS:
dict_tmp[zxname][zxext] = [zxdir, zxfile]

for game in dict_tmp:
if dict_tmp[game]:
Expand Down

0 comments on commit 4716488

Please sign in to comment.