Opened 6 years ago

Closed 6 years ago

#3559 closed defect (fixed)

Error for non trac-projects in the project dir

Reported by: bobbysmith007 Owned by: airadier
Priority: normal Component: SearchAllPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10


I have a few directories in my trac project dir which are not tracs (such as .egg-cache).

To get the search all to succeed I simply added a try/except continue around opening the environment. I think that overall this makes the plugin more robust without it losing any capability.

  • tracsearchall/

    5858            project_path = os.path.join(search_path,project) 
    5959            if not os.path.isdir( project_path ): 
    6060                continue 
    62             env = open_environment(project_path) 
     61            try: 
     62                env = open_environment(project_path) 
     63            except: 
     64                continue 
    6567            self.env.log.debug("Searching project %s" % project ) 

HTH and thanks for the plugin,

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by bobbysmith007

PS. airadier

If you want to give me commit access to this plugin, I would be more than happy to apply the outstanding patches and work on this occasionally. I run a couple of other plugins, so I know a bit about how they should work. Up to you, but I thought I would make the offer as there are some outstanding patches, which I have tested.

comment:2 Changed 6 years ago by airadier

  • Resolution set to fixed
  • Status changed from new to closed

(In [4343]) Fix search with non-environment folders. Closes #3559, thanks to bobbysmith007

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from airadier. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.