diff options
author | pjenvey <pjenvey@localhost> | 2009-07-14 21:32:44 +0000 |
---|---|---|
committer | pjenvey <pjenvey@localhost> | 2009-07-14 21:32:44 +0000 |
commit | 2e8c2fddfd649fb67e732e275b343fcb1c24b118 (patch) | |
tree | 805610696cddd392002ef2768530966d49cf2c23 | |
parent | beb10ff91899d3974bcfcbd862466f1e76393abf (diff) | |
download | pastedeploy-git-2e8c2fddfd649fb67e732e275b343fcb1c24b118.tar.gz |
use abspath, fixes path handling on Jython on Windows
thanks crankycoder
-rw-r--r-- | paste/deploy/loadwsgi.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/paste/deploy/loadwsgi.py b/paste/deploy/loadwsgi.py index bffa500..86aa604 100644 --- a/paste/deploy/loadwsgi.py +++ b/paste/deploy/loadwsgi.py @@ -2,7 +2,6 @@ # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php import os import re -import sys import urllib from ConfigParser import ConfigParser import pkg_resources @@ -249,17 +248,10 @@ def loadcontext(object_type, uri, name=None, relative_to=None, def _loadconfig(object_type, uri, path, name, relative_to, global_conf): + isabs = os.path.isabs(path) # De-Windowsify the paths: path = path.replace('\\', '/') - absolute_path = True - if sys.platform == 'win32': - _absolute_re = re.compile(r'^[a-zA-Z]:') - if not _absolute_re.search(path): - absolute_path = False - else: - if not path.startswith('/'): - absolute_path = False - if not absolute_path: + if not isabs: if not relative_to: raise ValueError( "Cannot resolve relative uri %r; no context keyword " |