Skip to content

Commit

Permalink
Adding additional logging to track down oddity in paths
Browse files Browse the repository at this point in the history
  • Loading branch information
james townley committed Feb 24, 2016
1 parent 8a195bd commit bbc7cf4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/firmware/firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,15 @@ def update(self, firmware_path):


def get_firmware_updater(logger=None, bootloader_idvendor=0x0483, bootloader_idproduct=0xdf11, peachy_idvendor=0x16d0, peachy_idproduct=0x0af3):
if logger:
logger.info("Firmware Flash Is Frozen: {}".format(str(getattr(sys, 'frozen', False))))
if 'darwin' in sys.platform:
if getattr(sys, 'frozen', False):
dependancies_path = sys._MEIPASS
else:
dependancies_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'dependancies', 'mac')
if logger:
logger.info("Firmware Flash Dependancies Path: {}".format(dependancies_path))
return MacFirmwareUpdater(dependancies_path, bootloader_idvendor, bootloader_idproduct, peachy_idvendor, peachy_idproduct, logger)
elif 'win' in sys.platform:
if getattr(sys, 'frozen', False):
Expand Down

0 comments on commit bbc7cf4

Please sign in to comment.