Message74435
Your patch does the correct thing, however an explanation of the -1
value would be welcome. Something like:
/* The file has been reopened; parsing will restart from
* the beginning of the file, we have to reset the line number.
* But this function has been called from inside tok_nextc() which
* will increment lineno before it returns. So we set it -1 so that
* the next call to tok_nextc() will start with tok->lineno == 0.
*/
Or we could change the place of the tok->lineno++ in tok_nextc() so that
it is called before the call to decoding_fgets(); other changes will be
needed.
Then, I think that your test is not correct: What is the meaning of the
following line?
sys.exit(traceback.tb_lineno(sys.exc_info()[2]))
(the module "traceback" has no attribute "tp_lineno")
I presume that you intended something like:
traceback.print_exc()
sys.exit(sys.exc_info()[2].tb_lineno)
and test at some point that "process.returncode == lineno" |
|
Date |
User |
Action |
Args |
2008-10-07 10:49:49 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, barry, pitrou, vstinner, ocean-city, jmfauth, dlitz |
2008-10-07 10:49:48 | amaury.forgeotdarc | set | messageid: <1223376588.58.0.565943993071.issue2384@psf.upfronthosting.co.za> |
2008-10-07 10:49:47 | amaury.forgeotdarc | link | issue2384 messages |
2008-10-07 10:49:47 | amaury.forgeotdarc | create | |
|