# Path: gogdb/application/datasources.py
# def get_storagedb():
#     if "storagedb" not in flask.g:
#         storage_path = flask.current_app.config["STORAGE_PATH"]
#         flask.g.storagedb = storage.Storage(storage_path)
# 
#     return flask.g.storagedb
# 
# def get_indexdb():
#     if "indexdb" not in flask.g:
#         storagedb = get_storagedb()
#         index_path = storagedb.path_indexdb()
#         flask.g.indexdb = sqlite3.connect(index_path)
#         flask.g.indexdb.row_factory = sqlite3.Row
# 
#     return flask.g.indexdb
# 
# Path: gogdb/core/normalization.py
# def decompress_systems(compressed):
#     systems = []
#     decompress_map = {
#         "w": "windows",
#         "l": "linux",
#         "o": "osx"
#     }
#     for letter in compressed:
#         systems.append(decompress_map[letter])
#     return systems


import copy
import datetime
import itertools
import flask
import gogdb.core.model as model
from gogdb.application.datasources import get_storagedb, get_indexdb
from gogdb.core.normalization import decompress_systems




class MockProduct:
    image_logo = None
    sale_rank = 0
    title = "Unknown"
    type = "unknown"
    comp_systems = []

    def __init__(self, product_id):
        self.id = product_id


def product_info(prod_id):

# Path: gogdb/application/datasources.py
# def get_storagedb():
#     if "storagedb" not in flask.g:
#         storage_path = flask.current_app.config["STORAGE_PATH"]
#         flask.g.storagedb = storage.Storage(storage_path)
# 
#     return flask.g.storagedb
# 
# def get_indexdb():
#     if "indexdb" not in flask.g:
#         storagedb = get_storagedb()
#         index_path = storagedb.path_indexdb()
#         flask.g.indexdb = sqlite3.connect(index_path)
#         flask.g.indexdb.row_factory = sqlite3.Row
# 
#     return flask.g.indexdb
# 
# Path: gogdb/core/normalization.py
# def decompress_systems(compressed):
#     systems = []
#     decompress_map = {
#         "w": "windows",
#         "l": "linux",
#         "o": "osx"
#     }
#     for letter in compressed:
#         systems.append(decompress_map[letter])
#     return systems


# Path: gogdb/views/product_info.py
import copy
import datetime
import itertools
import flask
import gogdb.core.model as model
from gogdb.application.datasources import get_storagedb, get_indexdb
from gogdb.core.normalization import decompress_systems





class MockProduct:
    image_logo = None
    sale_rank = 0
    title = "Unknown"
    type = "unknown"
    comp_systems = []

    def __init__(self, product_id):
        self.id = product_id


def product_info(prod_id):

    storagedb = get_storagedb()