Skip to content

Commit

Permalink
More frozen support
Browse files Browse the repository at this point in the history
  • Loading branch information
james townley committed Feb 24, 2016
1 parent 2eb9024 commit 2c7ac15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/firmware/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

from firmware import MacFirmwareUpdater, LinuxFirmwareUpdater, WindowsFirmwareUpdater


logger = logging.getLogger('peachy')


def get_firmware_updater(bootloader_idvendor=0x0483, bootloader_idproduct=0xdf11, peachy_idvendor=0x16d0, peachy_idproduct=0x0af3):
print("Firmware Flash Is Frozen: {}".format(str(getattr(sys, 'frozen', False))))
if 'darwin' in sys.platform:
Expand All @@ -30,4 +30,4 @@ def get_firmware_updater(bootloader_idvendor=0x0483, bootloader_idproduct=0xdf11
return LinuxFirmwareUpdater(dependancies_path, bootloader_idvendor, bootloader_idproduct, peachy_idvendor, peachy_idproduct)
else:
logger.error("Platform {} is unsupported for firmware updates".format(sys.platform))
raise Exception("Unsupported Platform")
raise Exception("Unsupported Platform")
1 change: 1 addition & 0 deletions src/firmware/firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

logger = logging.getLogger('peachy')


class FirmwareUpdater(object):
def __init__(self, dependancy_path, bootloader_idvendor, bootloader_idproduct, peachy_idvendor, peachy_idproduct):
self._bootloader_idvendor = bootloader_idvendor
Expand Down

0 comments on commit 2c7ac15

Please sign in to comment.