diff options
| -rw-r--r-- | pyramid/config/views.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pyramid/config/views.py b/pyramid/config/views.py index 1e213cced..1baaefcb6 100644 --- a/pyramid/config/views.py +++ b/pyramid/config/views.py @@ -1617,7 +1617,9 @@ class StaticURLInfo(object): registry = get_current_registry() for (url, spec, route_name) in self._get_registrations(registry): if path.startswith(spec): - subpath = path[len(spec):].replace('\\', '/') # windows + subpath = path[len(spec):] + if WIN: # pragma: no cover + subpath = subpath.replace('\\', '/') # windows if url is None: kw['subpath'] = subpath return request.route_url(route_name, **kw) |
