import urwid

# Import sconsole libs
import sconsole.cmdbar
import sconsole.static

FOOTER = [
        ('title', 'Salt Console'), '  ',
        ('key', 'UP'), '  ',
        ('key', 'DOWN'), '  ']


class Manager(object):
    def __init__(self, opts):
        self.opts = opts
        self.cmdbar = sconsole.cmdbar.CommandBar(self.opts)
        self.header = urwid.LineBox(urwid.Text(('banner', 'Salt Console'), align='center'))
        self.body = self.body()
        self.footer = urwid.AttrMap(urwid.Text(FOOTER), 'banner')
        self.view = urwid.Frame(
                body=self.body(),
                header=self.header,
                footer=self.footer)

    def body(self):
        dump = urwid.Filler(urwid.Text('', align='left'), valign='top')
        return urwid.Frame(dump, header=self.cmdbar.grid)

    def unhandled_input(self, key):
        if key in ('q', 'Q'):
            raise urwid.ExitMainLoop()

    def start(self):
        palette = sconsole.static.get_palette(
                self.opts.get('theme', 'std')
                )
        loop = urwid.MainLoop(
                self.view,
                palette=palette,
                unhandled_input=self.unhandled_input)
        loop.run()

import urwid

# Import sconsole libs
import sconsole.cmdbar
import sconsole.static

FOOTER = [
        ('title', 'Salt Console'), '  ',
        ('key', 'UP'), '  ',
        ('key', 'DOWN'), '  ']


class Manager(object):
    def __init__(self, opts):
        self.opts = opts
        self.cmdbar = sconsole.cmdbar.CommandBar(self.opts)
        self.header = urwid.LineBox(urwid.Text(('banner', 'Salt Console'), align='center'))
        self.body_frame = self.body()
        self.footer = urwid.AttrMap(urwid.Text(FOOTER), 'banner')
        self.view = urwid.Frame(
                body=self.body_frame,
                header=self.header,
                footer=self.footer)

    def body(self):
        dump = urwid.Filler(urwid.Text('', align='left'), valign='top')
        return urwid.Frame(dump, header=self.cmdbar.grid)

    def unhandled_input(self, key):
        if key in ('q', 'Q'):
            raise urwid.ExitMainLoop()

    def start(self):
        palette = sconsole.static.get_palette(
                self.opts.get('theme', 'std')
                )
        loop = urwid.MainLoop(
                self.view,
                palette=palette,
                unhandled_input=self.unhandled_input)
        loop.run()

Fix refs to body of sconsole
Fix refs to body of sconsole

  import urwid
  
  # Import sconsole libs
  import sconsole.cmdbar
  import sconsole.static
  
  FOOTER = [
          ('title', 'Salt Console'), '  ',
          ('key', 'UP'), '  ',
          ('key', 'DOWN'), '  ']
  
  
  class Manager(object):
      def __init__(self, opts):
          self.opts = opts
          self.cmdbar = sconsole.cmdbar.CommandBar(self.opts)
          self.header = urwid.LineBox(urwid.Text(('banner', 'Salt Console'), align='center'))
-         self.body = self.body()
+         self.body_frame = self.body()
          self.footer = urwid.AttrMap(urwid.Text(FOOTER), 'banner')
          self.view = urwid.Frame(
-                 body=self.body(),
+                 body=self.body_frame,
                  header=self.header,
                  footer=self.footer)
  
      def body(self):
          dump = urwid.Filler(urwid.Text('', align='left'), valign='top')
          return urwid.Frame(dump, header=self.cmdbar.grid)
  
      def unhandled_input(self, key):
          if key in ('q', 'Q'):
              raise urwid.ExitMainLoop()
  
      def start(self):
          palette = sconsole.static.get_palette(
                  self.opts.get('theme', 'std')
                  )
          loop = urwid.MainLoop(
                  self.view,
                  palette=palette,
                  unhandled_input=self.unhandled_input)
          loop.run()
  
Fix refs to body of sconsole
## Code Before:
import urwid

# Import sconsole libs
import sconsole.cmdbar
import sconsole.static

FOOTER = [
        ('title', 'Salt Console'), '  ',
        ('key', 'UP'), '  ',
        ('key', 'DOWN'), '  ']


class Manager(object):
    def __init__(self, opts):
        self.opts = opts
        self.cmdbar = sconsole.cmdbar.CommandBar(self.opts)
        self.header = urwid.LineBox(urwid.Text(('banner', 'Salt Console'), align='center'))
        self.body = self.body()
        self.footer = urwid.AttrMap(urwid.Text(FOOTER), 'banner')
        self.view = urwid.Frame(
                body=self.body(),
                header=self.header,
                footer=self.footer)

    def body(self):
        dump = urwid.Filler(urwid.Text('', align='left'), valign='top')
        return urwid.Frame(dump, header=self.cmdbar.grid)

    def unhandled_input(self, key):
        if key in ('q', 'Q'):
            raise urwid.ExitMainLoop()

    def start(self):
        palette = sconsole.static.get_palette(
                self.opts.get('theme', 'std')
                )
        loop = urwid.MainLoop(
                self.view,
                palette=palette,
                unhandled_input=self.unhandled_input)
        loop.run()

## Instruction:
Fix refs to body of sconsole
## Code After:
import urwid

# Import sconsole libs
import sconsole.cmdbar
import sconsole.static

FOOTER = [
        ('title', 'Salt Console'), '  ',
        ('key', 'UP'), '  ',
        ('key', 'DOWN'), '  ']


class Manager(object):
    def __init__(self, opts):
        self.opts = opts
        self.cmdbar = sconsole.cmdbar.CommandBar(self.opts)
        self.header = urwid.LineBox(urwid.Text(('banner', 'Salt Console'), align='center'))
        self.body_frame = self.body()
        self.footer = urwid.AttrMap(urwid.Text(FOOTER), 'banner')
        self.view = urwid.Frame(
                body=self.body_frame,
                header=self.header,
                footer=self.footer)

    def body(self):
        dump = urwid.Filler(urwid.Text('', align='left'), valign='top')
        return urwid.Frame(dump, header=self.cmdbar.grid)

    def unhandled_input(self, key):
        if key in ('q', 'Q'):
            raise urwid.ExitMainLoop()

    def start(self):
        palette = sconsole.static.get_palette(
                self.opts.get('theme', 'std')
                )
        loop = urwid.MainLoop(
                self.view,
                palette=palette,
                unhandled_input=self.unhandled_input)
        loop.run()
