changeset 8556:dd0445649244

bug(perf): put legacy '_file' last in tuple to speed up match
author John Rouillard <rouilj@ieee.org>
date Mon, 06 Apr 2026 01:30:55 -0400
parents 98fb176224fc
children f80c566f5726
files roundup/cgi/client.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/roundup/cgi/client.py	Mon Apr 06 01:27:39 2026 -0400
+++ b/roundup/cgi/client.py	Mon Apr 06 01:30:55 2026 -0400
@@ -1826,10 +1826,10 @@
         is generally only one entry long.
 
         - if there is no path, then we are in the "home" context.
-        - if the path is "_file", then the additional path entry
-          specifies the filename of a static file we're to serve up
-          from the instance "html" directory. Raises a SendStaticFile
-          exception.(*)
+        - if the path is "@@file" (or "_file", then the additional
+          path entry specifies the filename of a static file we're to
+          serve up from the instance "html" directory. Raises a
+          SendStaticFile exception.(*)
         - if there is something in the path (eg "issue"), it identifies
           the tracker class we're to display.
         - if the path is an item designator (eg "issue123"), then we're
@@ -1891,7 +1891,7 @@
             else:
                 self.template = ''
             return
-        if path[0] in ('_file', '@@file'):
+        if path[0] in ('@@file', '_file'):
             raise SendStaticFile(os.path.join(*path[1:]))
 
         self.classname = path[0]

Roundup Issue Tracker: http://roundup-tracker.org/