When I upgraded(?) from python-1.5.2 to python-2.2.2, I ran into the
problem mentioned on the plucker-list. I.E. the strings returned from
Url.py (for file and plucker protocols) have 'extra' slashes between
the protocol and path. This causes the check for a home.html document to
fail. (plucker:/home.html becomes plucker:///home.html when run thru Url.py).
File protocols also suffer the same fate. If I specify
'plucker-build foo.html' for foo.html in the current directory, the parser
looks for /foo.html and fails.
I'm proposing using the existing function in Url.py that replaces
urlparse.urlunparse (for file protocol) for windows systems for all
systems and for plucker and file systems. It then has the same (old)
behavior no matter what system or version of python you have.
It works with both python-1.5.2 and python-2.2.2.
I.E.
--- Url.py.orig Thu Jun 14 13:59:41 2001
+++ Url.py Sun Mar 16 20:28:18 2003
@@ -105,8 +105,9 @@
######################################################################
# Replacement for the urlparse lib, because this is buggy on Windows #
+# And its behavior changed in Python 2.2.2 CRH
######################################################################
-def windows_file_urlunparse(protocol, host, path, params, query, fragment):
+def plucker_file_urlunparse(protocol, host, path, params, query, fragment):
text = ''
if protocol != '':
text = text + protocol + ':' + path
@@ -155,8 +156,8 @@
fragment = self._fragment
else:
fragment = ""
- if sys.platform == 'win32' and self._protocol == 'file':
- text = windows_file_urlunparse (self._protocol,
+ if self._protocol == 'plucker' or self._protocol == 'file':
+ text = plucker_file_urlunparse (self._protocol,
self._host,
self._path,
self._params,
@@ -196,7 +197,7 @@
else:
fragment = ""
if sys.platform == 'win32' and self._protocol == 'file':
- text = windows_file_urlunparse ("",
+ text = plucker_file_urlunparse ("",
"",
self._path,
self._params,
Anyone see a problem??
Chris
Christopher R. Hawks Software Engineer
Syscon Plantstar a Division of Syscon International
-------------------------------------------------------------------------
We use Linux for all our mission-critical applications. Having the source code
means that we are not held hostage by anyone's support department.
-- Russell Nelson, President of Crynwr Software
_______________________________________________
plucker-dev mailing list
[EMAIL PROTECTED]
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev