# Buggy code
def __display_right(self, stat_display):
    """Display the right sidebar in the Curses interface.

    docker + processcount + amps + processlist + alert
    """
    # Do not display anything if space is not available...
    if self.screen.getmaxyx()[1] < self._left_sidebar_min_width:
        return

    # Restore line position
    self.next_line = self.saved_line

    # Display right sidebar
    self.new_column()
    for p in self._right_sidebar:
        self.new_line()
        if p == "processlist":
            self.display_plugin(
                stat_display["processlist"],
                display_optional=(self.screen.getmaxyx()[1] > 102),
                display_additional=(not MACOS),
                max_y=(
                    self.screen.getmaxyx()[0]
                    - self.get_stats_display_height(stat_display["alert"])
                    - 2
                ),
            )
        else:
            self.display_plugin(stat_display[p])


# Traceback (KeyError)
Traceback (most recent call last):
File "/usr/bin/glances", line 11, in <module>
load_entry_point('Glances==3.1.0', 'console_scripts', 'glances')()
File "/usr/lib/python2.7/site-packages/glances/__init__.py", line 140, in main
start(config=config, args=args)
File "/usr/lib/python2.7/site-packages/glances/__init__.py", line 109, in start
mode.serve_forever()
File "/usr/lib/python2.7/site-packages/glances/standalone.py", line 149, in serve_forever
loop = self.__serve_forever()
File "/usr/lib/python2.7/site-packages/glances/standalone.py", line 136, in __serve_forever
ret = not self.screen.update(self.stats, duration=adapted_refresh)
File "/usr/lib/python2.7/site-packages/glances/outputs/glances_curses.py", line 973, in update
self.flush(stats, cs_status=cs_status)
File "/usr/lib/python2.7/site-packages/glances/outputs/glances_curses.py", line 948, in flush
self.display(stats, cs_status=cs_status)
File "/usr/lib/python2.7/site-packages/glances/outputs/glances_curses.py", line 593, in display
self.__display_right(__stat_display)
File "/usr/lib/python2.7/site-packages/glances/outputs/glances_curses.py", line 762, in __display_right
self.display_plugin(stat_display[p])
KeyError: 'docker'
[nhe:~]↥ 4s 1 $

# Fixed code
def __display_right(self, stat_display):
    """Display the right sidebar in the Curses interface.

    docker + processcount + amps + processlist + alert
    """
    # Do not display anything if space is not available...
    if self.screen.getmaxyx()[1] < self._left_sidebar_min_width:
        return

    # Restore line position
    self.next_line = self.saved_line

    # Display right sidebar
    self.new_column()
    for p in self._right_sidebar:
        if p not in p:
            # Catch for issue #1470
            continue
        self.new_line()
        if p == "processlist":
            self.display_plugin(
                stat_display["processlist"],
                display_optional=(self.screen.getmaxyx()[1] > 102),
                display_additional=(not MACOS),
                max_y=(
                    self.screen.getmaxyx()[0]
                    - self.get_stats_display_height(stat_display["alert"])
                    - 2
                ),
            )
        else:
            self.display_plugin(stat_display[p])