summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-02-29 09:57:46 -0500
committerChris McDonough <chrism@plope.com>2012-02-29 09:57:46 -0500
commitc6fe32df427188fddd7a3df3f417531d7bd1d310 (patch)
tree8e8d070ae5cc8cfff1a2da59911e6d933e6d6217
parent2f665d86c6bd51fa88c9bc6a1c2abb561b8fcd42 (diff)
downloadpyramid-c6fe32df427188fddd7a3df3f417531d7bd1d310.tar.gz
pyramid-c6fe32df427188fddd7a3df3f417531d7bd1d310.tar.bz2
pyramid-c6fe32df427188fddd7a3df3f417531d7bd1d310.zip
only do replacement on windows
-rw-r--r--pyramid/config/views.py4
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)