old_contents: from fusesoc import section
  from fusesoc.fusesocconfigparser import FusesocConfigParser
  from fusesoc.config import Config
  import os
  import logging
  
  logger = logging.getLogger(__name__)
  
  class System:
      def __init__(self, system_file):
          self.backend_name = None
  
          self.system_root = os.path.dirname(system_file)
          self.config = FusesocConfigParser(system_file)
  
          self.name = os.path.basename(system_file).split('.')[0]
  
          self.pre_build_scripts  = self.config.get_list('scripts','pre_build_scripts')
          self.post_build_scripts = self.config.get_list('scripts','post_build_scripts')
  
          if self.config.has_option('main', 'backend'):
              self.backend_name = self.config.get('main','backend')
              self.backend = section.load_section(self.config, self.backend_name,
                      name=self.name)
  
  
      def info(self):
          print("\nSYSTEM INFO")
          print("Name:                   " + self.name)
  
          show_list = lambda s: "\n                        ".join(s.split('\n'))
  
          if self.backend_name:
              print("Backend name:           " + self.backend_name)
              print("    family:             " + self.backend['family'])
              print("    device:             " + self.backend['device'])
  
              print("\n    tcl_files:          " + show_list(self.backend['tcl_files']))
              print("\n    sdc_files:          " + show_list(self.backend['sdc_files']))
  
  
new_contents: from fusesoc import section
  from fusesoc.fusesocconfigparser import FusesocConfigParser
  from fusesoc.config import Config
  import os
  import logging
  
  logger = logging.getLogger(__name__)
  
  class System:
      def __init__(self, system_file):
          self.backend_name = None
  
          self.system_root = os.path.dirname(system_file)
          self.config = FusesocConfigParser(system_file)
  
          self.name = os.path.basename(system_file).split('.')[0]
  
          self.pre_build_scripts  = self.config.get_list('scripts','pre_build_scripts')
          self.post_build_scripts = self.config.get_list('scripts','post_build_scripts')
  
          if self.config.has_option('main', 'backend'):
              self.backend_name = self.config.get('main','backend')
              self.backend = section.load_section(self.config, self.backend_name,
                      name=self.name)
  
  
      def info(self):
          print("\nSYSTEM INFO")
          print(self.backend)
  
subject: Fix system-info after section refactoring