[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r31953 - branches/ctypes-python-bindings

From: Blair Zajac <blair_at_orcaware.com>
Date: Tue, 01 Jul 2008 11:35:43 -0700

arfrever_at_tigris.org wrote:
> Author: arfrever
> Date: Tue Jul 1 11:32:05 2008
> New Revision: 31953
>
> Log:
> On the 'ctypes-python-bindings' branch:
>
> * autogen.py: Search PATH for ctypesgen.
>
> Modified:
> branches/ctypes-python-bindings/autogen.py
>
> Modified: branches/ctypes-python-bindings/autogen.py
> URL: http://svn.collab.net/viewvc/svn/branches/ctypes-python-bindings/autogen.py?pathrev=31953&r1=31952&r2=31953
> ==============================================================================
> --- branches/ctypes-python-bindings/autogen.py Tue Jul 1 10:24:51 2008 (r31952)
> +++ branches/ctypes-python-bindings/autogen.py Tue Jul 1 11:32:05 2008 (r31953)
> @@ -157,7 +157,16 @@ def run_cmd(cmd):
> # Build csvn/core/functions.py
> ########################################################################
>
> -if not os.path.exists("ctypesgen"):
> +ctypesgen_basename = "wrap.py"
> +ctypesgen = ""
> +if os.path.exists("ctypesgen/" + ctypesgen_basename):
> + ctypesgen = os.getcwd() + "/ctypesgen/" + ctypesgen_basename
> +else:
> + for path in os.environ["PATH"].split(":"):
> + if os.path.exists(path + "/" + ctypesgen_basename):
> + ctypesgen = path + "/" + ctypesgen_basename
> + break

Wouldn't it be safer to use os.path.join() instead of string concatenation?
This is for non-Unix platforms.

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-01 20:35:59 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.