# Path: utils/process.py
# def get_stdout(cmd, shell=False):
#     rc, stdout, stderr = run_cmd(cmd, shell=shell)
#     return stdout


from utils.process import get_stdout
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2015, Florent Thiery 


#http://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/
RPI_REV = {
    '0002': 'Model B',
    '0003': 'Model B',
    '0004': 'Model B',
    '0005': 'Model B',
    '0006': 'Model B',
    '0007': 'Model A',
    '0008': 'Model A',
    '0009': 'Model A',
    '000d': 'Model B',
    '000e': 'Model B',
    '000f': 'Model B',
    '0010': 'Model B+',
    '0011': 'Compute Module',
    '0012': 'Model A+',
    'a01041': 'Pi 2 Model B',
    'a21041': 'Pi 2 Model B',
}

def get_pi_model():

# Path: utils/process.py
# def get_stdout(cmd, shell=False):
#     rc, stdout, stderr = run_cmd(cmd, shell=shell)
#     return stdout


# Path: utils/hardware.py
from utils.process import get_stdout

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2015, Florent Thiery 


#http://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/
RPI_REV = {
    '0002': 'Model B',
    '0003': 'Model B',
    '0004': 'Model B',
    '0005': 'Model B',
    '0006': 'Model B',
    '0007': 'Model A',
    '0008': 'Model A',
    '0009': 'Model A',
    '000d': 'Model B',
    '000e': 'Model B',
    '000f': 'Model B',
    '0010': 'Model B+',
    '0011': 'Compute Module',
    '0012': 'Model A+',
    'a01041': 'Pi 2 Model B',
    'a21041': 'Pi 2 Model B',
}

def get_pi_model():

    rev = get_stdout('grep Revision /proc/cpuinfo', shell=True).split(': ')[1].strip()