Ticket #1147: assume_ringlayout.patch

File assume_ringlayout.patch, 523 bytes (added by bemasc, 12 years ago)

Patch to assume ring layout if the provided layout is unknown

  • favoritesview.py

    old new  
    282282
    283283    def _set_layout(self, layout):
    284284        if layout not in LAYOUT_MAP:
    285             raise ValueError('Unknown favorites layout: %r' % layout)
     285            logging.warn('Unknown favorites layout: %r' % layout)
     286            layout = favoriteslayout.RingLayout.key
     287            assert layout in LAYOUT_MAP
    286288
    287289        if type(self._layout) == LAYOUT_MAP[layout]:
    288290            return