Ignore:
Timestamp:
6 Jun 2011, 22:49:37 (13 years ago)
Author:
uli
Message:

Remove the 'fix' from yesterday. We now use
IContextAwareDefaultFactory for setting image file fields and don't
have to care for already registered utilities on startup neccessarily
anymore.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/image/image.py

    r6284 r6291  
    3636    """
    3737    implements(IWAeUPImageFile)
    38 
    39     def _get_file(self):
    40         """Get the real file.
    41 
    42         We have to override this method from
    43         :class:`hurry.file.HurryFile` base because we need a more
    44         careful utility lookup.
    45         """
    46         storage = queryUtility(IFileRetrieval)
    47         if storage is None:
    48             # can happen on startup, see https://trac.waeup.org/ticket/32
    49             return StringIO(self.data)
    50         return storage.getFile(self.data)
    51 
    52     file = property(_get_file)
Note: See TracChangeset for help on using the changeset viewer.