Apache Mod-Python - Re: svn commit: r345126 - /httpd/mod_python/trunk/test/test.py

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > November 2005 > Re: svn commit: r345126 - /httpd/mod_python/trunk/test/test.py





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: svn commit: r345126 - /httpd/mod_python/trunk/test/test.py
Jim Gallacher

2005-11-16, 5:47 pm

nlehuen@apache.org wrote:
> Author: nlehuen
> Date: Wed Nov 16 13:15:06 2005
> New Revision: 345126
>
> URL: http://svn.apache.org/viewcvs?rev=345126&view=rev
> Log:
> Perform quoting AFTER the test for file existence... Otherwise with spaces in Apache path, the test for file existence will always fail since the system call with be done with the quotes (tested under Win32).


Yes, of course. I wasn't thinking there.

Would it be more logical to shift the quoteIfSpace call out of
get_ab_path and back into test_global_lock?

The quotes are required to create the cmd string in that function and
are not part of ab_path after all. Since we can't be sure how
get_ab_path might be used in the future, it may be best to leave the
quoting to the calling function.

Jim

> Modified:
> httpd/mod_python/trunk/test/test.py
>
> Modified: httpd/mod_python/trunk/test/test.py
> URL: http://svn.apache.org/viewcvs/httpd...45126&view=diff
> ========================================
======================================
> --- httpd/mod_python/trunk/test/test.py (original)
> +++ httpd/mod_python/trunk/test/test.py Wed Nov 16 13:15:06 2005
> @@ -166,9 +166,9 @@
> """ Find the location of the ab (apache benchmark) program """
> ab = None
> for name in ['ab', 'ab2']:
> - path = quoteIfSpace(os.path.join(os.path.split(HTTPD)[0], name))
> + path = os.path.join(os.path.split(HTTPD)[0], name)
> if os.path.exists(path):
> - ab = path
> + ab = quoteIfSpace(path)
> break
>
> return ab
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com