Mercurial > p > roundup > code
view roundup/version_check.py @ 7999:310e19beba3e
fix: report filename if template file is invalid
A file name like .#issue.search.html causes a crash because _find
returns None not a tuple and unpacking fails.
Trap the TypeError and raise ValueError with message that includes the
basename of the file.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 26 May 2024 11:14:10 -0400 |
| parents | 9223ed67af05 |
| children | f72381d300a4 |
line wrap: on
line source
#!/usr/bin/env python # Roundup requires Python 2.7+ as mentioned in doc\installation.txt from __future__ import print_function import sys VERSION_NEEDED = (2, 7) if sys.version_info < VERSION_NEEDED: print("Content-Type: text/plain\n") print("Roundup requires Python %s.%s or newer." % VERSION_NEEDED) sys.exit(0)
