513 |
|
# Unknown section |
514 |
|
raise Exception('unknownSection', section) |
515 |
|
except Exception as exc: |
516 |
< |
msg = exc.args[0] |
516 |
> |
if len(exc.args) >= 2: |
517 |
> |
msg = exc.args[0] |
518 |
> |
else: |
519 |
> |
# re-raise the exception |
520 |
> |
raise |
521 |
|
if msg == 'badKeyMapKey': |
522 |
|
# If we are here, then there was a non-empty keymap, and the parameter came from |
523 |
|
# the configuration file. |
524 |
|
violator = exc.args[1] |
525 |
< |
print('Unknown parameter name ' + "'" + violator + "'" + ' in ' + cfgfile + '.', file=sys.stderr) |
525 |
> |
print('Unknown parameter name ' + "'" + violator + "'" + ' in ' + fin.name + '.', file=sys.stderr) |
526 |
|
rv = bool(1) |
527 |
|
elif msg == 'badQuoteQual': |
528 |
|
# The bad quote qualifier came from the configuration file, not the addenda, since |
529 |
|
# we will have fixed any bad qualifiers in the addenda (which is populated by code). |
530 |
|
violator = exc.args[1] |
531 |
< |
print('Unknown quote qualifier ' + "'" + violator + "'" + ' in ' + cfgfile + '.', file=sys.stderr) |
531 |
> |
print('Unknown quote qualifier ' + "'" + violator + "'" + ' in ' + fin.name + '.', file=sys.stderr) |
532 |
|
rv = bool(1) |
533 |
|
elif msg == 'missingQuoteQual': |
534 |
|
violator = exc.args[1] |
535 |
< |
print('Missing quote qualifier for parameter ' + "'" + violator + "'" + ' in ' + cfgfile + '.', file=sys.stderr) |
535 |
> |
print('Missing quote qualifier for parameter ' + "'" + violator + "'" + ' in ' + fin.name + '.', file=sys.stderr) |
536 |
|
rv = bool(1) |
537 |
|
elif msg == 'paramNameTooLong': |
538 |
|
violator = exc.args[1] |
1058 |
|
print(exc.strerror, file=sys.stderr) |
1059 |
|
print('Unable to read configuration file ' + cfgfile + '.', file=sys.stderr) |
1060 |
|
except Exception as exc: |
1061 |
< |
type = exc.args[0] |
1061 |
> |
if len(exc.args) >= 2: |
1062 |
> |
type = exc.args[0] |
1063 |
> |
else: |
1064 |
> |
# re-raise the exception |
1065 |
> |
raise |
1066 |
> |
|
1067 |
|
if type == 'unexpectedIccRet': |
1068 |
|
msg = exc.args[1] |
1069 |
|
print('icc -V returned this unexpected message:\n' + msg, file=sys.stderr) |