Skip to content

exception/abort in Album thumbnail method, if thumbnail not available #401

@fche

Description

@fche

On a new installation of sigal running over O(10**5) pictures, have encountered a situation where after the hours of processing, sigal aborts with an uncaught exception. I'm afraid I no longer have the exact report (sorry!), but it related to this part of gallery.py (the def thumbnail(self) method):

self._thumbnail = (url_quote(self.name) + '/' +

where the

             self._thumbnail = (url_quote(self.name) + '/' +                           
                   f.thumbnail)                                           

expression was being evaluated. Python complained about a str not being addable to a NoneType. It appears as though f.thumbnail was None. The exception was not caught at any higher point in the call stack so the whole sigal process aborted at this point, every time. Ouch.

Adding these two little lines immediately before the statement

    if not f.thumbnail:                                                       
        continue    

cured the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions