Message7967
In changeset: 7836:219fc5804345 I committed readfile and expandfile.
def readfile(self, name, optional=False):
def expandfile(self, name, values=None, optional=False):
Docs are in the code with mentions in reference.txt and CHANGES.txt.
If optional is True, the methods return an empty string if the
file can't be found. Raise NoTemplate exception otherwise.
Changes from original discussion.
Only the template directory is searched, not tracker home.
No options={} are available.
Names changed since it can be used for lots of things besides javascript.
Autofixing bare %'s in the file on TypeError is not done. When using named parameters
and a dict, that becomes a ValueError not TypeError if the following char is not a '(' or valid
format char. So '4 % 5 is a value error unsupported format character ' ' (0x20) at index 9.
It's treated like any other value error: returning n empty string and logging an Error. |
|
Date |
User |
Action |
Args |
2024-03-26 20:49:06 | rouilj | set | messageid: <1711486146.36.0.744822782434.issue2551270@roundup.psfhosted.org> |
2024-03-26 20:49:06 | rouilj | set | recipients:
+ rouilj, asavchuk |
2024-03-26 20:49:06 | rouilj | link | issue2551270 messages |
2024-03-26 20:49:06 | rouilj | create | |
|