# Path: ice/logs.py
# STREAM_STRING_FORMAT = '%(leveltag)s%(message)s'
# FILE_STRING_FORMAT = '%(asctime)s [%(levelname)s][%(filename)s][%(funcName)s:%(lineno)s]: %(message)s'
# def is_test_stack_frame(frame):
# def is_running_in_test():
#   def _tag_for_level(self, levelno):
#   def filter(self, record):
# def create_stream_handler(level):
# def create_file_handler(level):
# def create_logger():
# class IceLevelTagFilter(logging.Formatter):
# 
# Path: ice/model.py
# ROM = collections.namedtuple('ROM', [
#   'name',
#   'path',
#   'console',
# ])


import os
from ice.logs import logger
from ice import model
    images_directory      = backing_store.get(identifier, 'images directory', "")
    emulator_identifier   = backing_store.get(identifier, 'emulator', "")

    icon = os.path.expanduser(icon)
    custom_roms_directory = os.path.expanduser(custom_roms_directory)
    images_directory = os.path.expanduser(images_directory)

    emulator = self.emulators.find(emulator_identifier)

    return model.Console(
      fullname,
      shortname,
      extensions,
      custom_roms_directory,
      prefix,
      icon,
      images_directory,
      emulator,
    )

  def verify(self, console):
    if console.emulator is None:
      logger.debug("No emulator provided for console `%s`" % console.fullname)
      return False

    return True

  def save_in_store(self, backing_store, identifier, console):
    backing_store.set(identifier, 'nickname', console.shortname)
    backing_store.set(identifier, 'extensions', console.extensions)

# Path: ice/logs.py
# STREAM_STRING_FORMAT = '%(leveltag)s%(message)s'
# FILE_STRING_FORMAT = '%(asctime)s [%(levelname)s][%(filename)s][%(funcName)s:%(lineno)s]: %(message)s'
# def is_test_stack_frame(frame):
# def is_running_in_test():
#   def _tag_for_level(self, levelno):
#   def filter(self, record):
# def create_stream_handler(level):
# def create_file_handler(level):
# def create_logger():
# class IceLevelTagFilter(logging.Formatter):
# 
# Path: ice/model.py
# ROM = collections.namedtuple('ROM', [
#   'name',
#   'path',
#   'console',
# ])


# Path: ice/persistence/adapters/console_adapter.py
import os
from ice.logs import logger
from ice import model

    images_directory      = backing_store.get(identifier, 'images directory', "")
    emulator_identifier   = backing_store.get(identifier, 'emulator', "")

    icon = os.path.expanduser(icon)
    custom_roms_directory = os.path.expanduser(custom_roms_directory)
    images_directory = os.path.expanduser(images_directory)

    emulator = self.emulators.find(emulator_identifier)

    return model.Console(
      fullname,
      shortname,
      extensions,
      custom_roms_directory,
      prefix,
      icon,
      images_directory,
      emulator,
    )

  def verify(self, console):
    if console.emulator is None:
      logger.debug("No emulator provided for console `%s`" % console.fullname)
      return False

    return True

  def save_in_store(self, backing_store, identifier, console):
    backing_store.set(identifier, 'nickname', console.shortname)
    backing_store.set(identifier, 'extensions', console.extensions)

    backing_store.set(identifier, 'roms directory', console.custom_roms_directory)