@@ -1501,16 +1501,12 @@ def _checkpoint(self, flags=''):
15011501
15021502 fromerr = re .search (r'\s*(.*?)\s*{}$' .format (checkpoint ), fromerr , re .M + re .S ).group (1 )
15031503
1504- warningre = re .compile (r'^.* (?:warning:\s*( .*?)\s*$)\n? ' , re .M + re .I )
1504+ warningre = re .compile (r'^\s*(.*? (?:warning|undefined) .*?)\s*$' , re .M + re .I )
15051505 warnings = warningre .findall (fromerr )
15061506
15071507 if printwarnings :
15081508 for w in warnings :
1509- sys .stderr .write ("Gnuplot warning: {}\n " .format (w ))
1510-
1511-
1512- # I've now read all the data up-to the checkpoint. Strip out all the warnings
1513- fromerr = warningre .sub ('' ,fromerr )
1509+ sys .stderr .write ("Gnuplot warns: {}\n " .format (w ))
15141510
15151511 # if asked, ignore and get rid of all the errors known to happen during
15161512 # plot-command testing. These include
@@ -1534,7 +1530,6 @@ def _checkpoint(self, flags=''):
15341530 re .X + re .M )
15351531 fromerr = r .sub ('' , fromerr )
15361532
1537-
15381533 # ignore a simple 'invalid range' error observed when, say only the
15391534 # xmin bound is set and all the data is below it
15401535 r = re .compile (r'''^gnuplot>\s*plot.*$ # the test plot command
@@ -1547,13 +1542,13 @@ def _checkpoint(self, flags=''):
15471542 # > xmax (inverted x axis) and when there's out-of-bounds data
15481543 r = re .compile (r'''^gnuplot>\s*plot.*$ # the test plot command
15491544 \n^\s+\^\s*$ # ^ mark pointing to where the error happened
1550- \n^.*all\s*points.*undefined.*$''' , # actual 'invalid range ' complaint
1545+ \n^.*all\s*points.*undefined.*$''' , # actual 'all points undefined ' complaint
15511546 re .X + re .M )
15521547 fromerr = r .sub ('' , fromerr )
15531548
15541549 # Newer gnuplot sometimes says 'x_min should not equal x_max!' when
15551550 # complaining about ranges. Ignore those here
1556- r = re .compile (r'^.*_min should not equal .*_max!.*$' , # actual 'invalid range ' complaint
1551+ r = re .compile (r'^.*_min should not equal .*_max!.*$' , # actual 'min != max ' complaint
15571552 re .M )
15581553 fromerr = r .sub ('' , fromerr )
15591554
@@ -1572,6 +1567,9 @@ def _checkpoint(self, flags=''):
15721567 re .X + re .M )
15731568 fromerr = r .sub ('' , fromerr )
15741569
1570+ # I've now read all the data up-to the checkpoint. Strip out all the warnings
1571+ fromerr = warningre .sub ('' ,fromerr )
1572+
15751573 fromerr = fromerr .strip ()
15761574
15771575 return fromerr , warnings
0 commit comments