[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #10933 [Chutney]: support for setting binary paths via environment varaibles



#10933: support for setting binary paths via environment varaibles
-----------------------------+----------------------------
     Reporter:  dave2008     |      Owner:  nickm
         Type:  enhancement  |     Status:  needs_revision
     Priority:  normal       |  Milestone:
    Component:  Chutney      |    Version:
   Resolution:               |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+----------------------------
Changes (by nickm):

 * status:  new => needs_revision


Comment:

 Possible bug:  If I have 'tor' and 'tor-gencert' in my path, and I don't
 set the environment variables, won't this fail?

 That is, when you call this code:
 {{{
 +        tor_path = self._env['tor']
 +        if not os.path.exists(tor_path):
 +            print "Cannot find Tor binary: {0}".format(tor_path)
 +            return False
 }}}

 I think that tor_path will be the string "tor", and
 "os.path.exists(tor_path)" will check whether there is a file named "tor"
 in the cwd, but it won't check for whether there is a file named "tor" in
 your path.

 One option is to remove those checks, and to allow subprocess.Popen to
 fail instead.  That won't give such a nice error message, though.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/10933#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs