[Trac-tickets] [The Trac Project] #1807: unexpected exception by checking existane of plugins directory

The Trac Project noreply at edgewall.com
Wed Jul 20 01:11:11 CDT 2005


#1807: unexpected exception by checking existane of plugins directory
---------------------+------------------------------------------------------
       Id:  1807     |      Status:  new                               
Component:  general  |    Modified:  Wed Jul 20 01:11:11 2005          
 Severity:  major    |   Milestone:                                    
 Priority:  normal   |     Version:  devel                             
    Owner:  jonas    |    Reporter:  Shun-ichi Goto <gotoh at taiyo.co.jp>
---------------------+------------------------------------------------------
 The line 71 of {{{loader.py}}} causes exception by {{{listdir()}}
 if 'plugins' directory does not exist.
 I think {{{os.path.exists()}}} should be used for this purpose.
 {{{
 --- loader.py   (revision 2009)
 +++ loader.py   (working copy)
 @@ -68,7 +68,7 @@
                          except ImportError, e:
                              env.log.error('Component module %s not
 found',
                                            module, exc_info=True)
 -    elif os.listdir(os.path.join(env.path, 'plugins')):
 +    elif os.path.exists(os.path.join(env.path, 'plugins')):
          self.env.warning('setuptools is required for plugin deployment')

      # Load default components
 }}}

 Many users are trapped here, I guess.

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/1807>
The Trac Project <>


More information about the Trac-Tickets mailing list