Changeset 447 for pkpgcounter

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.

Location:
pkpgcounter/trunk/pkpgpdls
Files:
2 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 
  • pkpgcounter/trunk/pkpgpdls/version.py

    r444 r447  
    2323 
    2424 
    25 __version__ = "2.14" 
     25__version__ = "2.15alpha" 
    2626 
    2727__doc__ = """pkpgcounter : a generic Page Description Languages parser."""