#15178: the pexpect in sage has a major bug in it -- the which command is broken
(easy to fix)
-------------------------------------+-------------------------------------
       Reporter:  was, certik        |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  critical           |    Milestone:  sage-6.3
      Component:  packages:          |   Resolution:
  standard                           |    Merged in:
       Keywords:                     |    Reviewers:  William Stein
        Authors:  Bradly Schlenker   |  Work issues:  Remove new patch, fix
Report Upstream:  N/A                |  old one
         Branch:                     |       Commit:
  u/bradlys/ticket/15178             |  5bd09123dafcf5df768a02365f6df93a44087777
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by leif):

 * status:  needs_review => needs_work
 * work_issues:   => Remove new patch, fix old one


Comment:

 Actually, the bug is introduced by us, trying to fix something else:
 {{{
 #!patch
 --- a/pexpect.py        2007-04-16 07:08:24.000000000 -0700
 +++ b/pexpect.py        2009-01-23 01:49:18.000000000 -0800
 @@ -1130,7 +1130,7 @@
      """
      # Special case where filename already contains a path.
      if os.path.dirname(filename) != '':
 -        if os.access (filename, os.X_OK):
 +        if os.access (filename, os.X_OK) and not os.path.isdir(f):
              return filename

      if not os.environ.has_key('PATH') or os.environ['PATH'] == '':
 @@ -1145,7 +1145,7 @@

      for path in pathlist:
          f = os.path.join(path, filename)
 -        if os.access(f, os.X_OK):
 +        if os.access(f, os.X_OK) and not os.path.isdir(f):
              return f
      return None

 }}}
 (This is `patches/pexpect.py-isdir_bug_fix.patch`, so ''that one'' should
 get fixed.)

--
Ticket URL: <http://trac.sagemath.org/ticket/15178#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to