Show
Ignore:
Timestamp:
01/23/07 10:23:29 (18 years ago)
Author:
jerome
Message:

Ensures some clever "student" can't generate '%%Pages:'
comment and fool us : we now take the maximal value instead
of the last one.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pkpgcounter/trunk/pkpgpdls/postscript.py

    r444 r447  
    101101            elif line.startswith(r"%%Pages: ") : 
    102102                try : 
    103                     pagescomment = int(line.split()[1]) 
     103                    pagescomment = max(pagescomment or 0, int(line.split()[1])) 
    104104                except ValueError : 
    105105                    pass # strange, to say the least