version 1.16, 2014/04/18 18:51:51
|
version 1.17, 2014/04/18 19:14:54
|
Line 513 def parseConfig(fin, keymap, addenda, de |
|
Line 513 def parseConfig(fin, keymap, addenda, de |
|
# Unknown section | # Unknown section |
raise Exception('unknownSection', section) | raise Exception('unknownSection', section) |
except Exception as exc: | except Exception as exc: |
|
if len(exc.args) >= 2: |
msg = exc.args[0] | msg = exc.args[0] |
|
else: |
|
# re-raise the exception |
|
raise |
if msg == 'badKeyMapKey': | if msg == 'badKeyMapKey': |
# If we are here, then there was a non-empty keymap, and the parameter came from | # If we are here, then there was a non-empty keymap, and the parameter came from |
# the configuration file. | # the configuration file. |
violator = exc.args[1] | violator = exc.args[1] |
print('Unknown parameter name ' + "'" + violator + "'" + ' in ' + cfgfile + '.', file=sys.stderr) |
print('Unknown parameter name ' + "'" + violator + "'" + ' in ' + fin.name + '.', file=sys.stderr) |
rv = bool(1) | rv = bool(1) |
elif msg == 'badQuoteQual': | elif msg == 'badQuoteQual': |
# The bad quote qualifier came from the configuration file, not the addenda, since | # The bad quote qualifier came from the configuration file, not the addenda, since |
# we will have fixed any bad qualifiers in the addenda (which is populated by code). | # we will have fixed any bad qualifiers in the addenda (which is populated by code). |
violator = exc.args[1] | violator = exc.args[1] |
print('Unknown quote qualifier ' + "'" + violator + "'" + ' in ' + cfgfile + '.', file=sys.stderr) |
print('Unknown quote qualifier ' + "'" + violator + "'" + ' in ' + fin.name + '.', file=sys.stderr) |
rv = bool(1) | rv = bool(1) |
elif msg == 'missingQuoteQual': | elif msg == 'missingQuoteQual': |
violator = exc.args[1] | violator = exc.args[1] |
print('Missing quote qualifier for parameter ' + "'" + violator + "'" + ' in ' + cfgfile + '.', file=sys.stderr) |
print('Missing quote qualifier for parameter ' + "'" + violator + "'" + ' in ' + fin.name + '.', file=sys.stderr) |
rv = bool(1) | rv = bool(1) |
elif msg == 'paramNameTooLong': | elif msg == 'paramNameTooLong': |
violator = exc.args[1] | violator = exc.args[1] |
Line 1054 def configureSdp(cfgfile, cfile, mfile, |
|
Line 1058 def configureSdp(cfgfile, cfile, mfile, |
|
print(exc.strerror, file=sys.stderr) | print(exc.strerror, file=sys.stderr) |
print('Unable to read configuration file ' + cfgfile + '.', file=sys.stderr) | print('Unable to read configuration file ' + cfgfile + '.', file=sys.stderr) |
except Exception as exc: | except Exception as exc: |
|
if len(exc.args) >= 2: |
type = exc.args[0] | type = exc.args[0] |
|
else: |
|
# re-raise the exception |
|
raise |
|
|
if type == 'unexpectedIccRet': | if type == 'unexpectedIccRet': |
msg = exc.args[1] | msg = exc.args[1] |
print('icc -V returned this unexpected message:\n' + msg, file=sys.stderr) | print('icc -V returned this unexpected message:\n' + msg, file=sys.stderr) |