From e064b10e38e615baade84b36833bf00c10776319 Mon Sep 17 00:00:00 2001 From: Geoffrey Poore Date: Thu, 10 May 2012 15:13:40 -0500 Subject: [PATCH] Bugfix for pythontex.py (actually fixes #1; the previous fix was needed but did not fix the specific behavior observed). --- pythontex/pythontex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythontex/pythontex.py b/pythontex/pythontex.py index f71713a..f620ea5 100644 --- a/pythontex/pythontex.py +++ b/pythontex/pythontex.py @@ -687,7 +687,7 @@ def do_pygments(outputdir, jobname, saveverbatim_threshold, oldsaveverbatim_thre #We need to let the user know we are switching code files print('\n---- Errors for '+basename+' ----') for errline in errfile: - if errline.find(basename) and search('line \d+',errline): + if basename in errline and search('line \d+',errline): errorcount+=1 #Offset by one for zero indexing, one for previous line errlinenumber=int(search('line (\d+)',errline).groups()[0])-2