diff options
-rw-r--r-- | ranger/ext/img_display.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ranger/ext/img_display.py b/ranger/ext/img_display.py index aa4822ec..abe09327 100644 --- a/ranger/ext/img_display.py +++ b/ranger/ext/img_display.py @@ -72,12 +72,16 @@ class ImageDisplayError(Exception): class ImgDisplayUnsupportedException(Exception): pass + def fallback_image_displayer(): """Simply makes some noise when chosen. Temporary fallback behavior.""" raise ImgDisplayUnsupportedException + IMAGE_DISPLAYER_REGISTRY = defaultdict(fallback_image_displayer) + + def register_image_displayer(nickname=None): """Register an ImageDisplayer by nickname if available.""" @@ -86,6 +90,7 @@ def register_image_displayer(nickname=None): return cls return decorator + class ImageDisplayer(object): """Image display provider functions for drawing images in the terminal""" |