def get_system_temp(): system_result = subprocess.check_output(SHELL_COMMAND) celsius_temp = utils.parse_temp_value(system_result) fahrenheit_temp = utils.celsius_to_fahrenheit(celsius_temp) return { 'date': datetime.datetime.utcnow(), 'celsius':celsius_temp, 'fahrenheit': fahrenheit_temp }
def get_system_temp(): system_result = subprocess.check_output(SHELL_COMMAND) celsius_temp = utils.parse_temp_value(system_result) fahrenheit_temp = utils.celsius_to_fahrenheit(celsius_temp) current_date = datetime.datetime.utcnow().isoformat() return { 'date': current_date, 'from': 'Starbug', 'celsius':celsius_temp, 'fahrenheit': fahrenheit_temp }