Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#1807 closed defect (fixed)

unexpected exception by checking existane of plugins directory

Reported by: Shun-ichi Goto <gotoh@…> Owned by: Christopher Lenz
Priority: normal Milestone: 0.9
Component: general Version: devel
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

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.

Attachments (0)

Change History (2)

comment:1 by Christopher Lenz, 19 years ago

Milestone: 0.9
Owner: changed from Jonas Borgström to Christopher Lenz
Severity: majorminor
Status: newassigned

You're right, I'll fix that.

comment:2 by Shun-ichi Goto <gotoh@…>, 19 years ago

Resolution: fixed
Status: assignedclosed

I confirmed this issue is fixed, so I close by hand because commit action of [2010] didn't close it automaticaly.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.