[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: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Tue, 1 Jul 2008 21:11:10 +0200

2008-07-01 20:35:43 Blair Zajac napisaƂ(a):
> 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.

Fixed in r31954.

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2008-07-01 21:17:00 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.